Function: vi-operator
vi-operator is an interactive and byte-compiled function defined in
vi.el.gz.
Signature
(vi-operator ARG)
Documentation
Handling vi operators (d/c/</>/!/=/y). Current implementation requires the key bindings of the operators being fixed.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/vi.el.gz
(defun vi-operator (arg)
"Handling vi operators (d/c/</>/!/=/y). Current implementation requires
the key bindings of the operators being fixed."
(interactive "P")
(catch 'vi-exit-op
(let ((this-op-char last-command-event))
(setq last-command-event (read-char))
(setq this-command (lookup-key vi-com-map (char-to-string last-command-event)))
(if (not (eq this-command 'vi-digit-argument))
(setq prefix-arg arg)
(vi-digit-argument arg)
(setq last-command-event (read-char))
(setq this-command (lookup-key vi-com-map (char-to-string last-command-event))))
(cond ((char-equal this-op-char last-command-event) ; line op
(vi-execute-op this-op-char 'next-line
(cons (1- (vi-prefix-numeric-value prefix-arg))
(vi-prefix-char-value prefix-arg))))
;; We assume any command that has no property 'point-moving-unit'
;; as having that property with the value 'CHAR'. 3/12/86
(t ;; (get this-command 'point-moving-unit)
(vi-execute-op this-op-char this-command prefix-arg))))))