1 |
;;; viper-macs.el --- functions implementing keyboard macros for Viper |
;;; viper-macs.el --- functions implementing keyboard macros for Viper |
2 |
|
|
3 |
;; Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. |
;; Copyright (C) 1994, 95, 96, 97, 2000, 01, 02 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: Michael Kifer <kifer@cs.sunysb.edu> |
;; Author: Michael Kifer <kifer@cs.stonybrook.edu> |
6 |
|
|
7 |
;; This file is part of GNU Emacs. |
;; This file is part of GNU Emacs. |
8 |
|
|
855 |
(error "Wrong type macro component, symbol-or-listp, %S" elt) |
(error "Wrong type macro component, symbol-or-listp, %S" elt) |
856 |
macro))) |
macro))) |
857 |
|
|
|
(defun viper-char-array-p (array) |
|
|
(eval (cons 'and (mapcar 'viper-characterp array)))) |
|
|
|
|
858 |
(defun viper-macro-to-events (macro-body) |
(defun viper-macro-to-events (macro-body) |
859 |
(vconcat (mapcar 'viper-key-to-emacs-key macro-body))) |
(vconcat (mapcar 'viper-key-to-emacs-key macro-body))) |
860 |
|
|
|
|
|
|
;; check if vec is a vector of character symbols |
|
|
(defun viper-char-symbol-sequence-p (vec) |
|
|
(and |
|
|
(sequencep vec) |
|
|
(eval |
|
|
(cons 'and |
|
|
(mapcar (lambda (elt) |
|
|
(and (symbolp elt) (= (length (symbol-name elt)) 1))) |
|
|
vec))))) |
|
861 |
|
|
|
|
|
|
;; Check if vec is a vector of key-press events representing characters |
|
|
;; XEmacs only |
|
|
(defun viper-event-vector-p (vec) |
|
|
(and (vectorp vec) |
|
|
(eval (cons 'and (mapcar '(lambda (elt) (if (eventp elt) t)) vec))))) |
|
|
|
|
862 |
|
|
863 |
;;; Reading fast key sequences |
;;; Reading fast key sequences |
864 |
|
|