From 840c88ebae9e39a6552a016aa3c64fb9c8fb672b Mon Sep 17 00:00:00 2001 From: "Michael W. Olson" Date: Fri, 12 Oct 2007 10:11:54 -0400 Subject: [PATCH] muse-mode: Insert text "http://" initially when reading a URL * lisp/muse-mode.el (muse-insert-url-initial-input): New option that specifies the initial text to use when reading a URL. Thanks to Seweryn Kokot for the suggestion. (muse-insert-url): Use it. --- ChangeLog | 7 +++++++ lisp/muse-mode.el | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 92ec6fd..adf9754 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-10-12 Michael Olson + + * lisp/muse-mode.el (muse-insert-url-initial-input): New option + that specifies the initial text to use when reading a URL. Thanks + to Seweryn Kokot for the suggestion. + (muse-insert-url): Use it. + 2007-10-11 Michael Olson * lisp/muse-latex.el (muse-latex-markup-specials-literal): Escape diff --git a/lisp/muse-mode.el b/lisp/muse-mode.el index 11c40a5..d8039ab 100644 --- a/lisp/muse-mode.el +++ b/lisp/muse-mode.el @@ -523,11 +523,17 @@ Valid values of OPERATION are 'increase and 'decrease." (muse-make-link (file-relative-name (read-file-name "Link: ")) (read-string "Text: ")))) +(defcustom muse-insert-url-initial-input "http://" + "The string to insert before reading a URL interactively. +This is used by the `muse-insert-url' command." + :type 'string + :group 'muse-mode) + (defun muse-insert-url () "Insert a URL, with optional description, at point." (interactive) (insert - (muse-make-link (read-string "URL: ") + (muse-make-link (read-string "URL: " muse-insert-url-initial-input) (read-string "Text: ")))) ;;;###autoload -- 2.11.4.GIT