]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix 'string-edit' when abort-callback is omitted
authorEli Zaretskii <eliz@gnu.org>
Sat, 8 Jun 2024 13:07:24 +0000 (16:07 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Jun 2024 05:30:28 +0000 (07:30 +0200)
* lisp/textmodes/string-edit.el (string-edit): Set
'string-edit--abort-callback' even if ABORT-CALLBACK is nil.
(Bug#71406)

(cherry picked from commit bd50c804eca3c15388d4c2d0ad12040c562bddb0)

lisp/textmodes/string-edit.el

index 03be426ac256e7353fa242e0f6a077ad7d808d92..cafed5a1e1616500d764297b33434a585926fc4d 100644 (file)
@@ -75,8 +75,7 @@ Also see `read-string-from-buffer'."
     (setq buffer-undo-list nil)
     (string-edit-mode)
     (setq-local string-edit--success-callback success-callback)
-    (when abort-callback
-      (setq-local string-edit--abort-callback abort-callback))
+    (setq-local string-edit--abort-callback abort-callback)
     (setq-local header-line-format
                 (substitute-command-keys
                  "Type \\<string-edit-mode-map>\\[string-edit-done] when you've finished editing or \\[string-edit-abort] to abort"))