• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/emulation/

Lines Matching +defs:ESC +defs:prefix

101 (defvar viper-prefix-commands '(?c ?d ?y ?! ?= ?# ?< ?> ?\"))
102 ;; define viper-prefix-command-p
103 (viper-test-com-defun viper-prefix-command)
137 ;; Commands that may have registers as prefix
147 viper-prefix-commands
352 ;; the last posn was recorded when we hit ESC.
355 ;; expansion caused by hitting ESC
375 (if viper-ESC-moves-cursor-back
750 ARG is used as the prefix value for the executed command. If
760 If the Vi command that the user types has a prefix argument, e.g., `d2w', then
761 Vi's prefix argument will be used. Otherwise, the prefix argument passed to
769 ;;(let (com key prefix-arg)
814 (setq prefix-arg (or prefix-arg arg))
993 (defun viper-ESC (arg)
994 "Emulate ESC key in Emacs.
995 Prevents multiple escape keystrokes if viper-no-multiple-ESC is true.
996 If viper-no-multiple-ESC is 'twice double ESC would ding in vi-state.
997 Other ESC sequences are emulated via the current Emacs's major mode
999 function keys such as up,down, etc. ESC will also will also work as
1000 a Meta key in this case. When viper-no-multiple-ESC is nil, ESC functions
1004 (cond ((and (not viper-no-multiple-ESC) (eq viper-current-state 'vi-state))
1007 ((and (eq viper-no-multiple-ESC 'twice)
1010 (if (= char (string-to-char viper-ESC-key))
1019 (sit-for 1) (message "ESC-")
1033 ;; Intercept ESC sequences on dumb terminals.
1036 ;; Check if last key was ESC and if so try to reread it as a function key.
1039 (defun viper-envelop-ESC-key ()
1043 (if (viper-ESC-event-p event)
1046 ;; a single ESC into ;; a fast keyseq. To guard against this, we
1057 ;; If keyseq translates into something that still has ESC
1058 ;; at the beginning, separate ESC from the rest of the seq.
1063 ;; If ESC is the first symbol, we interpret it as if the
1064 ;; user typed ESC and then quickly some other symbols.
1065 ;; If ESC is not the first one, then the key sequence
1072 ;; If `first-key' is not an ESC event, we make it into the
1076 ;; that the last event was ESC and so it'll execute whatever is
1077 ;; bound to ESC. (Viper macros can't be bound to
1078 ;; ESC-sequences).
1081 (cond ((and (viper-ESC-event-p first-key)
1082 (not viper-translate-all-ESC-keysequences))
1083 ;; put keys following ESC on the unread list
1084 ;; and return ESC as the key-sequence
1116 ;; Listen to ESC key.
1117 ;; If a sequence of keys starting with ESC is issued with very short delays,
1118 ;; interpret these keys in Emacs mode, so ESC won't be interpreted as a Vi key.
1119 (defun viper-intercept-ESC-key ()
1120 "Function that implements ESC key in Viper emulation of Vi."
1122 (let ((cmd (or (key-binding (viper-envelop-ESC-key))
1125 ;; call the actual function to execute ESC (if no other symbols followed)
1126 ;; or the key bound to the ESC sequence (if the sequence was issued
1128 (if (eq cmd 'viper-intercept-ESC-key)
1131 'viper-ESC)
1144 ;; prefix argument for Vi mode
1146 ;; In Vi mode, prefix argument is a dotted pair (NUM . COM) where NUM
1147 ;; represents the numeric value of the prefix argument and COM represents
1148 ;; command prefix such as "c", "d", "m" and "y".
1150 ;; Get value part of prefix-argument ARG.
1158 ;; Get raw value part of prefix-argument ARG.
1163 ;; Get com part of prefix-argument ARG.
1169 ;; Get com part of prefix-argument ARG and modify it.
1181 ;; Compute numeric prefix arg value.
1183 (defun viper-prefix-arg-value (event-char com)
1192 (setq prefix-arg value)
1193 (if com (setq prefix-arg (cons prefix-arg com)))
1195 (viper-describe-arg prefix-arg)
1204 ;; then execute it with funcall and clear prefix-arg in order to not
1209 ;; called from within viper-prefix-arg command, such as `d', `w',
1224 (funcall func prefix-arg)
1225 (setq prefix-arg nil))
1231 ;; Vi operator as prefix argument."
1232 (defun viper-prefix-arg-com (char value com)
1296 (setq prefix-arg (cons value com))
1298 (viper-region prefix-arg)
1299 (viper-Region prefix-arg))
1300 ;; reset prefix-arg
1301 (setq prefix-arg nil))
1302 ;; otherwise, reset prefix arg and call appropriate command
1304 (setq prefix-arg nil)
1351 (viper-prefix-arg-value
1359 (viper-prefix-arg-com
1642 (viper-special-prefix-com (- com 128))
1660 If the prefix argument, ARG, is non-nil, it is used instead of `val'."
1671 ;; non-nil its prefix value is used as new prefix value for the command.
1737 (defun viper-special-prefix-com (char)
1904 With prefix argument, find next destructive command."
1931 With prefix argument, cycles in the direction of newer elements.
2153 prefix and many different suffixes. Usually, only one of the suffixes
2288 ;; Repeats the insertion command if Insert state was entered with prefix
2583 These keys are ESC, RET, and LineFeed"
2589 (if (eq this-command 'viper-intercept-ESC-key)
2871 ;; If we skipped to the next word and the prefix of this line doesn't
3270 controlled by the sign of prefix numeric value."
3744 Without prefix argument, will ask which search style to toggle. With prefix
3788 With a prefix argument, this function unsets the macros.
3821 With a prefix argument, unsets the macro."
3841 With a prefix argument, this function unsets the macros.
3842 If the optional prefix argument is non-nil and specifies a valid major mode,
4042 (setq viper-prefix-commands
4043 (cons viper-buffer-search-char viper-prefix-commands)))
4822 (setq viper-no-multiple-ESC t
4832 (setq viper-no-multiple-ESC (if (viper-window-display-p)
4839 ; and viper-no-multiple-ESC
4852 viper-no-multiple-ESC
4853 (viper-standard-value 'viper-no-multiple-ESC)))))
4866 viper-no-multiple-ESC
4867 (viper-standard-value 'viper-no-multiple-ESC)
4919 4 -- GURU: Like 3, but user settings are respected for viper-no-multiple-ESC,
5046 'viper-no-multiple-ESC
5048 'viper-ESC-key