diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-10-12 13:40:51 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-10-12 13:40:51 +0200 |
commit | 820e6f399d0af56ebfdc581f68424f4cb9cbe53b (patch) | |
tree | 749afc5e1b0908aff78c217118538c7cfb800063 /lisp/textmodes | |
parent | aa559c15537a59147bb01617b4a1f9eee20af3a1 (diff) | |
download | emacs-820e6f399d0af56ebfdc581f68424f4cb9cbe53b.tar.gz emacs-820e6f399d0af56ebfdc581f68424f4cb9cbe53b.tar.bz2 emacs-820e6f399d0af56ebfdc581f68424f4cb9cbe53b.zip |
Fix thinko in read-string-from-buffer
* lisp/textmodes/string-edit.el (string-edit-done): Return an empty
string when the user has entered no text.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r-- | lisp/textmodes/string-edit.el | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lisp/textmodes/string-edit.el b/lisp/textmodes/string-edit.el index 562ab60d137..3270050ca4a 100644 --- a/lisp/textmodes/string-edit.el +++ b/lisp/textmodes/string-edit.el @@ -119,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) |