[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/remove-locked-narrowing 13c4d64d95a: Remove safe_run_hooks_maybe
From: |
Gregory Heytings |
Subject: |
scratch/remove-locked-narrowing 13c4d64d95a: Remove safe_run_hooks_maybe_narrowed |
Date: |
Fri, 10 Feb 2023 19:13:01 -0500 (EST) |
branch: scratch/remove-locked-narrowing
commit 13c4d64d95abd04a0d204a6a51f9961a28c490a9
Author: Gregory Heytings <gregory@heytings.org>
Commit: Gregory Heytings <gregory@heytings.org>
Remove safe_run_hooks_maybe_narrowed
* 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.
---
src/keyboard.c | 20 +++-----------------
src/lisp.h | 1 -
2 files changed, 3 insertions(+), 18 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)
/* Note that the value cell will never directly contain nil
if the symbol is a local variable. */
if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks))
- safe_run_hooks_maybe_narrowed (Qpost_command_hook,
- XWINDOW (selected_window));
+ safe_run_hooks (Qpost_command_hook);
/* If displaying a message, resize the echo area window to fit
that message's size exactly. */
@@ -1455,8 +1454,7 @@ command_loop_1 (void)
Vthis_command = cmd;
Vreal_this_command = cmd;
- safe_run_hooks_maybe_narrowed (Qpre_command_hook,
- XWINDOW (selected_window));
+ safe_run_hooks (Qpre_command_hook);
if (NILP (Vthis_command))
/* nil means key is undefined. */
@@ -1506,8 +1504,7 @@ command_loop_1 (void)
}
kset_last_prefix_arg (current_kboard, Vcurrent_prefix_arg);
- safe_run_hooks_maybe_narrowed (Qpost_command_hook,
- XWINDOW (selected_window));
+ safe_run_hooks (Qpost_command_hook);
/* If displaying a message, resize the echo area window to fit
that message's size exactly. Do this only if the echo area
@@ -1902,17 +1899,6 @@ safe_run_hooks (Lisp_Object hook)
unbind_to (count, Qnil);
}
-void
-safe_run_hooks_maybe_narrowed (Lisp_Object hook, struct window *w)
-{
- specpdl_ref count = SPECPDL_INDEX ();
-
- specbind (Qinhibit_quit, Qt);
- run_hook_with_args (2, ((Lisp_Object []) {hook, hook}),
- safe_run_hook_funcall);
- unbind_to (count, Qnil);
-}
-
void
safe_run_hooks_2 (Lisp_Object hook, Lisp_Object arg1, Lisp_Object arg2)
{
diff --git a/src/lisp.h b/src/lisp.h
index d1431352845..3fddb090f61 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4855,7 +4855,6 @@ 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 safe_run_hooks_2 (Lisp_Object, Lisp_Object, Lisp_Object);
extern void cmd_error_internal (Lisp_Object, const char *);
extern Lisp_Object command_loop_2 (Lisp_Object);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scratch/remove-locked-narrowing 13c4d64d95a: Remove safe_run_hooks_maybe_narrowed,
Gregory Heytings <=