diff options
| author | Miha Rihtaršič | 2021-07-20 14:36:45 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-07-20 14:36:45 +0200 |
| commit | 7edbcb3648e9d08a4ccc291f672f831b4f07eb5c (patch) | |
| tree | 30f6ce7415be55f973b0071d2d957023b9b8c4c7 /src/data.c | |
| parent | 557c59591cb03729c7ab56719e5ed87a1f06d435 (diff) | |
| download | emacs-7edbcb3648e9d08a4ccc291f672f831b4f07eb5c.tar.gz emacs-7edbcb3648e9d08a4ccc291f672f831b4f07eb5c.zip | |
Quit minibuffers without aborting kmacros
* doc/lispref/commands.texi (Quitting): Document `minibuffer-quit'
(Recursive Editing): Document throwing of function values to `exit'.
* doc/lispref/errors.texi (Standard Errors): Document
`minibuffer-quit'
* lisp/minibuffer.el (minibuffer-quit-recursive-edit): New function.
* lisp/simple.el (minibuffer-error-function): Do not abort keyboard
macro execution if is minibuffer-quit is signaled (bug#48603).
* src/data.c (syms_of_data): New error symbol `minibuffer-quit'
* src/keyboard.c (recursive_edit_1): Implement throwing of function
values to `exit`. In that case, the function will be called without
arguments before returning from the command loop.
(cmd_error):
(Fcommand_error_default_function): Do not abort keyboard macro
execution if minibuffer-quit is signaled.
(command_loop_2): New argument HANDLERS.
* src/macros.c (Fexecute_kbd_macro): Use command_loop_2 instead of
command_loop_1.
* src/minibuf.c (Fabort_minibuffers): Use it.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/data.c b/src/data.c index 9adfafacaa5..ffca7e75355 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -3901,6 +3901,7 @@ syms_of_data (void) | |||
| 3901 | DEFSYM (Qerror, "error"); | 3901 | DEFSYM (Qerror, "error"); |
| 3902 | DEFSYM (Quser_error, "user-error"); | 3902 | DEFSYM (Quser_error, "user-error"); |
| 3903 | DEFSYM (Qquit, "quit"); | 3903 | DEFSYM (Qquit, "quit"); |
| 3904 | DEFSYM (Qminibuffer_quit, "minibuffer-quit"); | ||
| 3904 | DEFSYM (Qwrong_length_argument, "wrong-length-argument"); | 3905 | DEFSYM (Qwrong_length_argument, "wrong-length-argument"); |
| 3905 | DEFSYM (Qwrong_type_argument, "wrong-type-argument"); | 3906 | DEFSYM (Qwrong_type_argument, "wrong-type-argument"); |
| 3906 | DEFSYM (Qargs_out_of_range, "args-out-of-range"); | 3907 | DEFSYM (Qargs_out_of_range, "args-out-of-range"); |
| @@ -3973,6 +3974,7 @@ syms_of_data (void) | |||
| 3973 | Fput (sym, Qerror_message, build_pure_c_string (msg)) | 3974 | Fput (sym, Qerror_message, build_pure_c_string (msg)) |
| 3974 | 3975 | ||
| 3975 | PUT_ERROR (Qquit, Qnil, "Quit"); | 3976 | PUT_ERROR (Qquit, Qnil, "Quit"); |
| 3977 | PUT_ERROR (Qminibuffer_quit, pure_cons (Qquit, Qnil), "Quit"); | ||
| 3976 | 3978 | ||
| 3977 | PUT_ERROR (Quser_error, error_tail, ""); | 3979 | PUT_ERROR (Quser_error, error_tail, ""); |
| 3978 | PUT_ERROR (Qwrong_length_argument, error_tail, "Wrong length argument"); | 3980 | PUT_ERROR (Qwrong_length_argument, error_tail, "Wrong length argument"); |