comparison lisp/emulation/viper-macs.el @ 18839:1405083241e8

new version
author Michael Kifer <kifer@cs.stonybrook.edu>
date Thu, 17 Jul 1997 19:37:07 +0000
parents e145ccc61a22
children dfbef8117c6a
comparison
equal deleted inserted replaced
18838:6f9fa4c8e92a 18839:1405083241e8
25 25
26 ;; compiler pacifier 26 ;; compiler pacifier
27 (defvar vip-ex-work-buf) 27 (defvar vip-ex-work-buf)
28 (defvar vip-custom-file-name) 28 (defvar vip-custom-file-name)
29 (defvar vip-current-state) 29 (defvar vip-current-state)
30 (defvar vip-fast-keyseq-timeout)
30 31
31 ;; loading happens only in non-interactive compilation 32 ;; loading happens only in non-interactive compilation
32 ;; in order to spare non-viperized emacs from being viperized 33 ;; in order to spare non-viperized emacs from being viperized
33 (if noninteractive 34 (if noninteractive
34 (eval-when-compile 35 (eval-when-compile
69 (defvar vip-this-kbd-macro nil 70 (defvar vip-this-kbd-macro nil
70 "Vector of keys representing the name of currently running Viper kbd macro.") 71 "Vector of keys representing the name of currently running Viper kbd macro.")
71 (defvar vip-last-kbd-macro nil 72 (defvar vip-last-kbd-macro nil
72 "Vector of keys representing the name of last Viper keyboard macro.") 73 "Vector of keys representing the name of last Viper keyboard macro.")
73 74
74 (defconst vip-fast-keyseq-timeout 200 75 (defcustom vip-repeat-from-history-key 'f12
75 "*Key sequence separated by no more than this many milliseconds is viewed as a macro, if such a macro is defined. 76 "Prefix key for accessing previously typed Vi commands.
76 This also controls ESC-keysequences generated by keyboard function keys.") 77
77 78 The previous command is accessible, as usual, via `.'. The command before this
78 79 can be invoked as `<this key> 1', and the command before that, and the command
79 (defvar vip-repeat-from-history-key 'f12 80 before that one is accessible as `<this key> 2'.
80 "Prefix key for invocation of vip-repeat-from-history function,
81 which repeats previous destructive commands from the history of such
82 commands.
83 This function can then be invoked as <this-key> 1 or <this-key> 2.
84 The notation for these keys is borrowed from XEmacs. Basically, 81 The notation for these keys is borrowed from XEmacs. Basically,
85 a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., 82 a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g.,
86 `(meta control f1)'.") 83 `(meta control f1)'."
84 :type 'key
85 :group 'viper)
87 86
88 87
89 88
90 ;;; Code 89 ;;; Code
91 90
542 (setq macro-pair mode-mapping) 541 (setq macro-pair mode-mapping)
543 (message "%S is unmapped for %s in %S" 542 (message "%S is unmapped for %s in %S"
544 (vip-display-macro macro-name) state-name major-mode)) 543 (vip-display-macro macro-name) state-name major-mode))
545 ((cdr (setq macro-pair (vip-kbd-global-pair macro-entry))) 544 ((cdr (setq macro-pair (vip-kbd-global-pair macro-entry)))
546 (message 545 (message
547 "Global mapping of %S for %s is removed" 546 "Global mapping for %S in %s is removed"
548 (vip-display-macro macro-name) state-name)) 547 (vip-display-macro macro-name) state-name))
549 (t (error "%S is not mapped to a macro for %s in `%s'" 548 (t (error "%S is not mapped to a macro for %s in `%s'"
550 (vip-display-macro macro-name) 549 (vip-display-macro macro-name)
551 state-name (buffer-name)))) 550 state-name (buffer-name))))
552 (setcdr macro-pair nil) 551 (setcdr macro-pair nil)