diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2022-01-15 16:23:09 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2022-01-24 11:41:47 +0100 |
commit | a8b713d83a5544d144c05aa45c465bbe3ebc8789 (patch) | |
tree | 9d2f6fe7e20d9eeff70739c4cdc2b689a9745f2a /src/eval.c | |
parent | b7902a9b48f8e7f83ab6b90cfd8bc95aab410e6f (diff) | |
download | emacs-a8b713d83a5544d144c05aa45c465bbe3ebc8789.tar.gz emacs-a8b713d83a5544d144c05aa45c465bbe3ebc8789.tar.bz2 emacs-a8b713d83a5544d144c05aa45c465bbe3ebc8789.zip |
Inline maybe_quit
Since `maybe_quit` is called on many critical paths, inline a slightly
cheaper condition (that ignores Vinhibit_quit).
* src/eval.c (maybe_quit): Rename to `probably_quit`.
* src/lisp.h (maybe_quit): New simplified inline function.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/eval.c b/src/eval.c index 744fe82347d..205a0b0db2a 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1737,21 +1737,8 @@ process_quit_flag (void) quit (); } -/* Check quit-flag and quit if it is non-nil. Typing C-g does not - directly cause a quit; it only sets Vquit_flag. So the program - needs to call maybe_quit at times when it is safe to quit. Every - loop that might run for a long time or might not exit ought to call - maybe_quit at least once, at a safe place. Unless that is - impossible, of course. But it is very desirable to avoid creating - loops where maybe_quit is impossible. - - If quit-flag is set to `kill-emacs' the SIGINT handler has received - a request to exit Emacs when it is safe to do. - - When not quitting, process any pending signals. */ - void -maybe_quit (void) +probably_quit (void) { if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) process_quit_flag (); |