as the events will already have been added once as they were read for
the first time. An element of the form @w{@code{(t . @var{event})}}
forces @var{event} to be added to the current command's key sequence.
+
+@cindex not recording input events
+@cindex input events, prevent recording
+Elements read from this list are normally recorded by the
+record-keeping features (@pxref{Recording Input}) and while defining a
+keyboard macro (@pxref{Keyboard Macros}). However, an element of the
+form @w{@code{(no-record . @var{event})}} causes @var{event} to be
+processed normally without recording it.
@end defvar
@defun listify-key-sequence key
;; C-x binding after the first C-x C-x was rewritten to just C-x).
(prefix-command-preserve-state)
;; Push the key back on the event queue
- (setq unread-command-events (cons key unread-command-events))))
+ (setq unread-command-events (cons (cons 'no-record key)
+ unread-command-events))))
(defun cua--prefix-override-handler ()
"Start timer waiting for prefix key to be followed by another key.
if (CONSP (c) && EQ (XCAR (c), Qt))
c = XCDR (c);
else
- reread = true;
+ {
+ if (CONSP (c) && EQ (XCAR (c), Qno_record))
+ {
+ c = XCDR (c);
+ recorded = true;
+ }
+ reread = true;
+ }
/* Undo what read_char_x_menu_prompt did when it unread
additional keys returned by Fx_popup_menu. */
if (CONSP (c) && EQ (XCAR (c), Qt))
c = XCDR (c);
else
- reread = true;
+ {
+ if (CONSP (c) && EQ (XCAR (c), Qno_record))
+ {
+ c = XCDR (c);
+ recorded = true;
+ }
+ reread = true;
+ }
}
/* Read something from current KBOARD's side queue, if possible. */
if (CONSP (c) && EQ (XCAR (c), Qt))
c = XCDR (c);
+ else if (CONSP (c) && EQ (XCAR (c), Qno_record))
+ {
+ c = XCDR (c);
+ recorded = true;
+ }
}
non_reread:
Fput (var, Qevent_symbol_elements, list1 (var));
}
}
+ DEFSYM (Qno_record, "no-record");
button_down_location = make_nil_vector (5);
staticpro (&button_down_location);
These events are processed first, before actual keyboard input.
Events read from this list are not normally added to `this-command-keys',
as they will already have been added once as they were read for the first time.
-An element of the form (t . EVENT) forces EVENT to be added to that list. */);
+An element of the form (t . EVENT) forces EVENT to be added to that list.
+An element of the form (no-record . EVENT) means process EVENT, but do not
+record it in the keyboard macros, recent-keys, and the dribble file. */);
Vunread_command_events = Qnil;
DEFVAR_LISP ("unread-post-input-method-events", Vunread_post_input_method_events,