Function: vi-name-last-change-or-macro
vi-name-last-change-or-macro is an interactive and byte-compiled
function defined in vi.el.gz.
Signature
(vi-name-last-change-or-macro ARG CHAR)
Documentation
Give name to the last change command or just defined kbd macro.
If prefix ARG is given, name last macro, otherwise name last change command. The following CHAR will be the name for the command or macro.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/vi.el.gz
(defun vi-name-last-change-or-macro (arg char)
"Give name to the last change command or just defined kbd macro.
If prefix ARG is given, name last macro, otherwise name last change command.
The following CHAR will be the name for the command or macro."
(interactive "P\nc")
(if arg
(name-last-kbd-macro (intern (char-to-string char)))
(if (eq (car vi-last-change-command) 'vi-first-redo-insertion)
(let* ((args (cdr vi-last-change-command)) ; save the insertion text
(str (buffer-substring (nth 0 args) (nth 1 args)))
(overwrite-p (nth 2 args))
(prefix-code (nth 3 args)))
(vi-set-last-change-command 'vi-more-redo-insertion str
overwrite-p prefix-code)))
(fset (intern (char-to-string char)) vi-last-change-command)))