Function: viper-read-fast-keysequence

viper-read-fast-keysequence is a byte-compiled function defined in viper-macs.el.gz.

Signature

(viper-read-fast-keysequence EVENT MACRO-ALIST)

Source Code

;; Defined in /usr/src/emacs/lisp/emulation/viper-macs.el.gz
;;; Reading fast key sequences

;; Assuming that CHAR was the first character in a fast succession of key
;; strokes, read the rest.  Return the vector of keys that was entered in
;; this fast succession of key strokes.
;; A fast keysequence is one that is terminated by a pause longer than
;; viper-fast-keyseq-timeout.
(defun viper-read-fast-keysequence (event macro-alist)
  ;; FIXME: Do we still need this?  Now that the discrimination between the ESC
  ;; key and the ESC byte sent as part of terminal escape sequences is performed
  ;; in the input-decode-map, I suspect that we don't need this hack any more.
  (let ((lis (vector event))
	next-event)
    (while (and (viper-fast-keysequence-p)
           (viper-keyseq-is-a-possible-macro lis macro-alist))
      ;; Seems that viper-read-event is more robust here. We need to be able to
      ;; place these events on unread-command-events list. If we use
      ;; read-key then events will be converted to keys, and sometimes
      ;; (e.g., (control \[)) those keys differ from the corresponding events.
      ;; So, do not use (setq next-event (read-key))
      (setq next-event (read-event))
      (or (viper-mouse-event-p next-event)
	  (setq lis (vconcat lis (vector next-event)))))
    lis))