* bug#71406: 30.0.50; string-edit signals error when user aborts and :abort-callback parameter nil
@ 2024-06-06 16:03 Nicholas Vollmer
2024-06-08 13:09 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Vollmer @ 2024-06-06 16:03 UTC (permalink / raw)
To: 71406
1. emacs -q
2. eval (string-edit "test" "" #'ignore)
3. In the "*edit string*" buffer eval string-edit-abort.
The following error is signaled:
Debugger entered--Lisp error: (void-variable
string-edit--abort-callback)
string-edit-abort()
funcall-interactively(string-edit-abort)
command-execute(string-edit-abort)
Seeing as string-edit specifies this parameter as a &key, it
should either provide a default (#'ignore?) or error if the caller
does not provide an abort function (Though why specify it as a
keyword arg if it's mandatory?).
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#71406: 30.0.50; string-edit signals error when user aborts and :abort-callback parameter nil
2024-06-06 16:03 bug#71406: 30.0.50; string-edit signals error when user aborts and :abort-callback parameter nil Nicholas Vollmer
@ 2024-06-08 13:09 ` Eli Zaretskii
2024-06-10 20:50 ` Nicholas Vollmer
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2024-06-08 13:09 UTC (permalink / raw)
To: Nicholas Vollmer; +Cc: 71406
> From: Nicholas Vollmer <nv@parenthetic.dev>
> Date: Thu, 06 Jun 2024 12:03:34 -0400
>
>
> 1. emacs -q
> 2. eval (string-edit "test" "" #'ignore)
> 3. In the "*edit string*" buffer eval string-edit-abort.
>
> The following error is signaled:
>
> Debugger entered--Lisp error: (void-variable
> string-edit--abort-callback)
> string-edit-abort()
> funcall-interactively(string-edit-abort)
> command-execute(string-edit-abort)
>
> Seeing as string-edit specifies this parameter as a &key, it
> should either provide a default (#'ignore?) or error if the caller
> does not provide an abort function (Though why specify it as a
> keyword arg if it's mandatory?).
Thanks, I fixed this with the patch below.
diff --git a/lisp/textmodes/string-edit.el b/lisp/textmodes/string-edit.el
index 03be426..cafed5a 100644
--- a/lisp/textmodes/string-edit.el
+++ b/lisp/textmodes/string-edit.el
@@ -75,8 +75,7 @@ string-edit
(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"))
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#71406: 30.0.50; string-edit signals error when user aborts and :abort-callback parameter nil
2024-06-08 13:09 ` Eli Zaretskii
@ 2024-06-10 20:50 ` Nicholas Vollmer
2024-06-15 10:42 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Vollmer @ 2024-06-10 20:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 71406
Eli Zaretskii <eliz@gnu.org> writes:
> Thanks, I fixed this with the patch below.
Makes sense. Works on my end, too.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#71406: 30.0.50; string-edit signals error when user aborts and :abort-callback parameter nil
2024-06-10 20:50 ` Nicholas Vollmer
@ 2024-06-15 10:42 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2024-06-15 10:42 UTC (permalink / raw)
To: Nicholas Vollmer; +Cc: 71406-done
> From: Nicholas Vollmer <nv@parenthetic.dev>
> Cc: 71406@debbugs.gnu.org
> Date: Mon, 10 Jun 2024 16:50:29 -0400
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Thanks, I fixed this with the patch below.
>
> Makes sense. Works on my end, too.
Thanks, I'm therefore closing this bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-15 10:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-06 16:03 bug#71406: 30.0.50; string-edit signals error when user aborts and :abort-callback parameter nil Nicholas Vollmer
2024-06-08 13:09 ` Eli Zaretskii
2024-06-10 20:50 ` Nicholas Vollmer
2024-06-15 10:42 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.