diff options
author | Philip Kaludercic <philipk@posteo.net> | 2022-10-15 17:38:30 +0200 |
---|---|---|
committer | Philip Kaludercic <philipk@posteo.net> | 2022-10-15 17:38:30 +0200 |
commit | 01e45efcd44e92dd259283df0e62653c7c20e9cc (patch) | |
tree | 552c1a6ce7d52b897cf5f089d6c589921efbe9bd /lisp/textmodes/string-edit.el | |
parent | 982c0e6c15535defcf6ac3c4d4169708c60efc18 (diff) | |
parent | 5933055a3e7387b0095f0df7876a208ab15f4f45 (diff) | |
download | emacs-01e45efcd44e92dd259283df0e62653c7c20e9cc.tar.gz emacs-01e45efcd44e92dd259283df0e62653c7c20e9cc.tar.bz2 emacs-01e45efcd44e92dd259283df0e62653c7c20e9cc.zip |
Merge branch 'master' into feature/package+vc
Diffstat (limited to 'lisp/textmodes/string-edit.el')
-rw-r--r-- | lisp/textmodes/string-edit.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/textmodes/string-edit.el b/lisp/textmodes/string-edit.el index 53850674ac0..3270050ca4a 100644 --- a/lisp/textmodes/string-edit.el +++ b/lisp/textmodes/string-edit.el @@ -46,7 +46,9 @@ called with no parameters. PROMPT will be inserted at the start of the buffer, but won't be included in the resulting string. If PROMPT is nil, no help text -will be inserted." +will be inserted. + +Also see `read-string-from-buffer'." (with-current-buffer (generate-new-buffer "*edit string*") (when prompt (let ((inhibit-read-only t)) @@ -88,7 +90,9 @@ The user finishes editing with \\<string-edit-mode-map>\\[string-edit-done], or PROMPT will be inserted at the start of the buffer, but won't be included in the resulting string. If nil, no prompt will be -inserted in the buffer." +inserted in the buffer. + +Also see `string-edit'." (string-edit prompt string @@ -115,9 +119,7 @@ This will kill the current buffer." (interactive) (goto-char (point-min)) ;; Skip past the help text. - (when-let ((match (text-property-search-forward - 'string-edit--prompt nil t))) - (goto-char (prop-match-beginning match))) + (text-property-search-forward 'string-edit--prompt) (let ((string (buffer-substring (point) (point-max))) (callback string-edit--success-callback)) (quit-window 'kill) |