From: Eli Zaretskii Date: Sat, 8 Jun 2024 13:07:24 +0000 (+0300) Subject: Fix 'string-edit' when abort-callback is omitted X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=06da63053998edcb7c949f2aae47593184a9b6bb;p=emacs.git Fix 'string-edit' when abort-callback is omitted * 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) --- diff --git a/lisp/textmodes/string-edit.el b/lisp/textmodes/string-edit.el index 03be426ac25..cafed5a1e16 100644 --- a/lisp/textmodes/string-edit.el +++ b/lisp/textmodes/string-edit.el @@ -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-done] when you've finished editing or \\[string-edit-abort] to abort"))