Function: viper-set-unread-command-events

viper-set-unread-command-events is a byte-compiled function defined in viper-util.el.gz.

Signature

(viper-set-unread-command-events ARG)

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/viper-util.el.gz
;; Arg is a character, an event, a list of events or a sequence of
;; keys.
;;
;; Due to the way unread-command-events works in Emacs, a non-event
;; symbol in unread-command-events list may cause Emacs to turn this
;; symbol into an event.  Below, we delete nil from event lists, since
;; nil is the most common symbol that might appear in this wrong
;; context.
(defun viper-set-unread-command-events (arg)
  (setq
   unread-command-events
   (let ((new-events
	  (cond ((eventp arg) (list arg))
		((listp arg) arg)
		((sequencep arg)
		 (listify-key-sequence arg))
		(t (error
		    "viper-set-unread-command-events: Invalid argument, %S"
		    arg)))))
     (if (not (eventp nil))
	 (setq new-events (delq nil new-events)))
     (append new-events unread-command-events))))