]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix thinko in read-string-from-buffer
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 12 Oct 2022 11:40:51 +0000 (13:40 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 12 Oct 2022 11:40:51 +0000 (13:40 +0200)
* lisp/textmodes/string-edit.el (string-edit-done): Return an empty
string when the user has entered no text.

lisp/textmodes/string-edit.el

index 562ab60d13721dac156c9ca27ea64b8cbcf21e06..3270050ca4a7e1253931285bcd06f39f03c9b88e 100644 (file)
@@ -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)