From 5e296283f57b21e962e6e6860e448905f99f281e Mon Sep 17 00:00:00 2001 From: Gregory Heytings Date: Sun, 31 Jul 2022 20:32:15 +0000 Subject: Add locked narrowing around pre- and post-command-hook * src/keyboard.c (safe_run_hooks_maybe_narrowed): New function. (command_loop_1): Use it for 'pre-command-hook' and 'post-command-hook'. (syms_of_keyboard): Update docstrings of 'pre-command-hook' and 'post-command-hook'. * src/lisp.h: Prototype of the new function. --- src/lisp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lisp.h') diff --git a/src/lisp.h b/src/lisp.h index 8fcc9b6e75a..7136bb3dc1e 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4829,6 +4829,7 @@ extern bool detect_input_pending (void); extern bool detect_input_pending_ignore_squeezables (void); extern bool detect_input_pending_run_timers (bool); extern void safe_run_hooks (Lisp_Object); +extern void safe_run_hooks_maybe_narrowed (Lisp_Object, struct window *); extern void cmd_error_internal (Lisp_Object, const char *); extern Lisp_Object command_loop_2 (Lisp_Object); extern Lisp_Object read_menu_command (void); -- cgit v1.2.1