diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index aa58e268435..01d7ce9d5e0 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -3150,6 +3150,10 @@ help_char_p (Lisp_Object c) | |||
| 3150 | static void | 3150 | static void |
| 3151 | record_char (Lisp_Object c) | 3151 | record_char (Lisp_Object c) |
| 3152 | { | 3152 | { |
| 3153 | /* quail.el binds this to avoid recording keys twice. */ | ||
| 3154 | if (inhibit_record_char) | ||
| 3155 | return; | ||
| 3156 | |||
| 3153 | int recorded = 0; | 3157 | int recorded = 0; |
| 3154 | 3158 | ||
| 3155 | if (CONSP (c) && (EQ (XCAR (c), Qhelp_echo) || EQ (XCAR (c), Qmouse_movement))) | 3159 | if (CONSP (c) && (EQ (XCAR (c), Qhelp_echo) || EQ (XCAR (c), Qmouse_movement))) |
| @@ -3256,7 +3260,7 @@ record_char (Lisp_Object c) | |||
| 3256 | /* Write c to the dribble file. If c is a lispy event, write | 3260 | /* Write c to the dribble file. If c is a lispy event, write |
| 3257 | the event's symbol to the dribble file, in <brackets>. Bleaugh. | 3261 | the event's symbol to the dribble file, in <brackets>. Bleaugh. |
| 3258 | If you, dear reader, have a better idea, you've got the source. :-) */ | 3262 | If you, dear reader, have a better idea, you've got the source. :-) */ |
| 3259 | if (dribble) | 3263 | if (dribble && NILP (Vexecuting_kbd_macro)) |
| 3260 | { | 3264 | { |
| 3261 | block_input (); | 3265 | block_input (); |
| 3262 | if (INTEGERP (c)) | 3266 | if (INTEGERP (c)) |
| @@ -10110,10 +10114,13 @@ DEFUN ("recursion-depth", Frecursion_depth, Srecursion_depth, 0, 0, 0, | |||
| 10110 | 10114 | ||
| 10111 | DEFUN ("open-dribble-file", Fopen_dribble_file, Sopen_dribble_file, 1, 1, | 10115 | DEFUN ("open-dribble-file", Fopen_dribble_file, Sopen_dribble_file, 1, 1, |
| 10112 | "FOpen dribble file: ", | 10116 | "FOpen dribble file: ", |
| 10113 | doc: /* Start writing all keyboard characters to a dribble file called FILE. | 10117 | doc: /* Start writing input events to a dribble file called FILE. |
| 10114 | If FILE is nil, close any open dribble file. | 10118 | If FILE is nil, close any open dribble file. |
| 10115 | The file will be closed when Emacs exits. | 10119 | The file will be closed when Emacs exits. |
| 10116 | 10120 | ||
| 10121 | The events written to the file include keyboard and mouse input | ||
| 10122 | events, but not events from executing keyboard macros. | ||
| 10123 | |||
| 10117 | Be aware that this records ALL characters you type! | 10124 | Be aware that this records ALL characters you type! |
| 10118 | This may include sensitive information such as passwords. */) | 10125 | This may include sensitive information such as passwords. */) |
| 10119 | (Lisp_Object file) | 10126 | (Lisp_Object file) |
| @@ -11848,6 +11855,14 @@ signals. */); | |||
| 11848 | Vwhile_no_input_ignore_events, | 11855 | Vwhile_no_input_ignore_events, |
| 11849 | doc: /* Ignored events from while-no-input. */); | 11856 | doc: /* Ignored events from while-no-input. */); |
| 11850 | Vwhile_no_input_ignore_events = Qnil; | 11857 | Vwhile_no_input_ignore_events = Qnil; |
| 11858 | |||
| 11859 | DEFVAR_BOOL ("inhibit--record-char", | ||
| 11860 | inhibit_record_char, | ||
| 11861 | doc: /* If non-nil, don't record input events. | ||
| 11862 | This inhibits recording input events for the purposes of keyboard | ||
| 11863 | macros, dribble file, and `recent-keys'. | ||
| 11864 | Internal use only. */); | ||
| 11865 | inhibit_record_char = false; | ||
| 11851 | } | 11866 | } |
| 11852 | 11867 | ||
| 11853 | void | 11868 | void |