diff options
| author | Phillip Lord | 2019-01-05 20:31:15 +0100 |
|---|---|---|
| committer | Phillip Lord | 2019-01-22 21:46:03 +0000 |
| commit | 7b31de4d107302ed91ce7519cd778b340a9880ee (patch) | |
| tree | efd0ca3ab5066991c8b6bafb6fceaa3d8c441a18 /src | |
| parent | fd943124439b7644392919bca8bc2a77e6316d92 (diff) | |
| download | emacs-7b31de4d107302ed91ce7519cd778b340a9880ee.tar.gz emacs-7b31de4d107302ed91ce7519cd778b340a9880ee.zip | |
Add hook for all events
* lisp/subr.el (input-event-functions): Add input-event-functions
* src/keyboard.c (read_char): Call input-event-functions on all hooks
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 2d6fa91a16c..838dc242dd9 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2919,6 +2919,8 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2919 | if (! NILP (also_record)) | 2919 | if (! NILP (also_record)) |
| 2920 | record_char (also_record); | 2920 | record_char (also_record); |
| 2921 | 2921 | ||
| 2922 | Frun_hook_with_args (2, ((Lisp_Object []) {Qinput_event_functions, c})); | ||
| 2923 | |||
| 2922 | /* Wipe the echo area. | 2924 | /* Wipe the echo area. |
| 2923 | But first, if we are about to use an input method, | 2925 | But first, if we are about to use an input method, |
| 2924 | save the echo area contents for it to refer to. */ | 2926 | save the echo area contents for it to refer to. */ |
| @@ -11022,6 +11024,8 @@ syms_of_keyboard (void) | |||
| 11022 | 11024 | ||
| 11023 | DEFSYM (Qundefined, "undefined"); | 11025 | DEFSYM (Qundefined, "undefined"); |
| 11024 | 11026 | ||
| 11027 | DEFSYM (Qinput_event_functions, "input-event-functions"); | ||
| 11028 | |||
| 11025 | /* Hooks to run before and after each command. */ | 11029 | /* Hooks to run before and after each command. */ |
| 11026 | DEFSYM (Qpre_command_hook, "pre-command-hook"); | 11030 | DEFSYM (Qpre_command_hook, "pre-command-hook"); |
| 11027 | DEFSYM (Qpost_command_hook, "post-command-hook"); | 11031 | DEFSYM (Qpost_command_hook, "post-command-hook"); |