From: Lars Ingebrigtsen Date: Wed, 12 Oct 2022 11:40:51 +0000 (+0200) Subject: Fix thinko in read-string-from-buffer X-Git-Tag: emacs-29.0.90~1616^2~651 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=820e6f399d0af56ebfdc581f68424f4cb9cbe53b;p=emacs.git 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. --- 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)