X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/93c36a6dc791865b6ece2a628cb5328327484317..66236b772af493888a34148662dca58561958a6f:/lisp/skeleton.el diff --git a/lisp/skeleton.el b/lisp/skeleton.el index 47b4f7f9fe..eb5a17e417 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el @@ -131,8 +131,9 @@ If there is a highlighted region, the skeleton text is wrapped around the region text. A prefix argument ARG says to wrap the skeleton around the next ARG words. +A prefix argument of -1 says to wrap around region, even if not highlighted. A prefix argument of zero says to wrap around zero words---that is, nothing. -This is a way of overiding the use of a highlighted region.") +This is a way of overriding the use of a highlighted region.") (interactive "*P\nP") (skeleton-proxy-new ',skeleton str arg)))) @@ -321,9 +322,11 @@ When done with skeleton, but before going back to `_'-point call (if skeleton-point (goto-char skeleton-point)))))) -(defun skeleton-read (PROMPT &optional initial-input recursive) +(defun skeleton-read (prompt &optional initial-input recursive) "Function for reading a string from the minibuffer within skeletons. -PROMPT may contain a `%s' which will be replaced by `skeleton-subprompt'. + +PROMPT must be a string or a form that evaluates to a string. +It may contain a `%s' which will be replaced by `skeleton-subprompt'. If non-`nil' second arg INITIAL-INPUT or variable `input' is a string or cons with index to insert before reading. If third arg RECURSIVE is non-`nil' i.e. we are handling the iterator of a subskeleton, returns empty string if @@ -362,7 +365,7 @@ automatically, and you are prompted to fill in the variable parts."))) (equal prompt initial-input) (equal prompt (car-safe initial-input)))) (signal 'quit t) - str)) + prompt)) (defun skeleton-internal-list (skeleton &optional str recursive) (let* ((start (save-excursion (beginning-of-line) (point)))