Function: viper-events-to-macro

viper-events-to-macro is a byte-compiled function defined in viper-macs.el.gz.

Signature

(viper-events-to-macro EVENT-SEQ)

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/viper-macs.el.gz
;; convert sequence of events (that came presumably from emacs kbd macro) into
;; Viper's macro, which is a vector of the form
;; [ desc desc ... ]
;; Each desc is either a symbol of (meta symb), (shift symb), etc.
;; Here we purge events that happen to be lists.  In most cases, these events
;; got into a macro definition unintentionally; say, when the user moves mouse
;; during a macro definition, then something like (switch-frame ...) might get
;; in.  Another reason for purging lists-events is that we can't store them in
;; textual form (say, in .emacs) and then read them back.
(defun viper-events-to-macro (event-seq)
  (vconcat (delq nil (mapcar (lambda (elt) (if (consp elt)
					       nil
					     (viper-event-key elt)))
			     event-seq))))