aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorGregory Heytings2023-02-11 00:02:51 +0000
committerGregory Heytings2023-02-11 01:12:39 +0100
commit13c4d64d95abd04a0d204a6a51f9961a28c490a9 (patch)
treefdf0cd2fdc677145312edae53d70679f0069f2fa /src/keyboard.c
parent8f908fb45b72a32f5965d69cac138be75537385c (diff)
downloademacs-scratch/remove-locked-narrowing.tar.gz
emacs-scratch/remove-locked-narrowing.zip
Remove safe_run_hooks_maybe_narrowedscratch/remove-locked-narrowing
* src/keyboard.c (safe_run_hooks_maybe_narrowed): Remove, it is identical to 'safe_run_hooks'. (command_loop_1): Replace calls to 'safe_run_hooks_maybe_narrowed' by cals to 'safe_run_hooks'. * src/lisp.h: Remove external declaration.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 01a49e3d8bf..810f8eb6480 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1286,8 +1286,7 @@ command_loop_1 (void)
1286 /* Note that the value cell will never directly contain nil 1286 /* Note that the value cell will never directly contain nil
1287 if the symbol is a local variable. */ 1287 if the symbol is a local variable. */
1288 if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks)) 1288 if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks))
1289 safe_run_hooks_maybe_narrowed (Qpost_command_hook, 1289 safe_run_hooks (Qpost_command_hook);
1290 XWINDOW (selected_window));
1291 1290
1292 /* If displaying a message, resize the echo area window to fit 1291 /* If displaying a message, resize the echo area window to fit
1293 that message's size exactly. */ 1292 that message's size exactly. */
@@ -1455,8 +1454,7 @@ command_loop_1 (void)
1455 Vthis_command = cmd; 1454 Vthis_command = cmd;
1456 Vreal_this_command = cmd; 1455 Vreal_this_command = cmd;
1457 1456
1458 safe_run_hooks_maybe_narrowed (Qpre_command_hook, 1457 safe_run_hooks (Qpre_command_hook);
1459 XWINDOW (selected_window));
1460 1458
1461 if (NILP (Vthis_command)) 1459 if (NILP (Vthis_command))
1462 /* nil means key is undefined. */ 1460 /* nil means key is undefined. */
@@ -1506,8 +1504,7 @@ command_loop_1 (void)
1506 } 1504 }
1507 kset_last_prefix_arg (current_kboard, Vcurrent_prefix_arg); 1505 kset_last_prefix_arg (current_kboard, Vcurrent_prefix_arg);
1508 1506
1509 safe_run_hooks_maybe_narrowed (Qpost_command_hook, 1507 safe_run_hooks (Qpost_command_hook);
1510 XWINDOW (selected_window));
1511 1508
1512 /* If displaying a message, resize the echo area window to fit 1509 /* If displaying a message, resize the echo area window to fit
1513 that message's size exactly. Do this only if the echo area 1510 that message's size exactly. Do this only if the echo area
@@ -1903,17 +1900,6 @@ safe_run_hooks (Lisp_Object hook)
1903} 1900}
1904 1901
1905void 1902void
1906safe_run_hooks_maybe_narrowed (Lisp_Object hook, struct window *w)
1907{
1908 specpdl_ref count = SPECPDL_INDEX ();
1909
1910 specbind (Qinhibit_quit, Qt);
1911 run_hook_with_args (2, ((Lisp_Object []) {hook, hook}),
1912 safe_run_hook_funcall);
1913 unbind_to (count, Qnil);
1914}
1915
1916void
1917safe_run_hooks_2 (Lisp_Object hook, Lisp_Object arg1, Lisp_Object arg2) 1903safe_run_hooks_2 (Lisp_Object hook, Lisp_Object arg1, Lisp_Object arg2)
1918{ 1904{
1919 specpdl_ref count = SPECPDL_INDEX (); 1905 specpdl_ref count = SPECPDL_INDEX ();