Mercurial > emacs
diff lisp/emulation/viper-macs.el @ 12140:75379a19c5d5
Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
unread-command-events, removed support for emacs versions 19.28 and
xemacs 19.11 and earlier.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 09 Jun 1995 00:12:29 +0000 |
parents | d1f620273acb |
children | 3d339e94aece |
line wrap: on
line diff
--- a/lisp/emulation/viper-macs.el Fri Jun 09 00:11:53 1995 +0000 +++ b/lisp/emulation/viper-macs.el Fri Jun 09 00:12:29 1995 +0000 @@ -1,6 +1,5 @@ ;;; viper-macs.el -- functions implementing keyboard macros for Viper - -;; Copyright (C) 1995 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -45,7 +44,7 @@ "Vector of keys representing the name of last Viper keyboard macro.") (defconst vip-fast-keyseq-timeout 200 - "*Key sequences separated by this many miliseconds are interpreted as a macro, if such a macro is defined. + "*Key sequence separated by no more than this many milliseconds is viewed as a macro, if such a macro is defined. This also controls ESC-keysequences generated by keyboard function keys.") @@ -62,8 +61,8 @@ ;;; Code +;; Ex map command (defun ex-map () - "Ex map command." (let ((mod-char "") macro-name macro-body map-args ins) (save-window-excursion @@ -93,8 +92,8 @@ )) +;; Ex unmap (defun ex-unmap () - "Ex unmap." (let ((mod-char "") temp macro-name ins) (save-window-excursion @@ -178,8 +177,8 @@ (setq macro-body (vip-char-array-to-macro macro-body))) ((vectorp macro-body) nil) (t (error "map: Invalid syntax in macro definition")))) - (cons macro-name macro-body) - )) + (setq cursor-in-echo-area nil)(sit-for 0) ; this overcomes xemacs tty bug + (cons macro-name macro-body))) @@ -444,6 +443,12 @@ ;; macro name must be a vector of vip-style keys (defun vip-unrecord-kbd-macro (macro-name state) + "Delete macro MACRO-NAME from Viper STATE. +MACRO-NAME must be a vector of vip-style keys. This command is used by Viper +internally, but the user can also use it in ~/.vip to delete pre-defined macros +supplied with Viper. The best way to avoid mistakes in macro names to be passed +to this function is to use vip-describe-kbd-macros and copy the name from +there." (let* (state-name keymap (macro-alist-var (cond ((eq state 'vi-state) @@ -521,7 +526,7 @@ )) )) -;; Checks if MACRO-ALIST has an entry for a macro name starting with +;; Check if MACRO-ALIST has an entry for a macro name starting with ;; CHAR. If not, this indicates that the binding for this char ;; in vip-vi/insert-kbd-map can be released. (defun vip-can-release-key (char macro-alist) @@ -751,8 +756,8 @@ (setq candidates (delq nil candidates)))) -;; if seq of key symbols can be converted to a string--do so. Otherwise, do -;; nothing. +;; if seq of Viper key symbols (representing a macro) can be converted to a +;; string--do so. Otherwise, do nothing. (defun vip-display-macro (macro-name) (cond ((vip-char-symbol-sequence-p macro-name) (mapconcat 'symbol-name macro-name "")) @@ -763,7 +768,7 @@ (defun vip-events-to-macro (event-seq) (vconcat (mapcar 'vip-event-key event-seq))) -;; convert strings of characters or arrays of characters to Viper macro form +;; convert strings or arrays of characters to Viper macro form (defun vip-char-array-to-macro (array) (let ((vec (vconcat array)) macro)