Function: viper-prev-destructive-command
viper-prev-destructive-command is an interactive and byte-compiled
function defined in viper-cmd.el.gz.
Signature
(viper-prev-destructive-command NEXT)
Documentation
Find previous destructive command in the history of destructive commands.
With prefix argument, find next destructive command.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emulation/viper-cmd.el.gz
(defun viper-prev-destructive-command (next)
"Find previous destructive command in the history of destructive commands.
With prefix argument, find next destructive command."
(interactive "P")
(let (cmd viper-intermediate-command)
(if (eq last-command 'viper-display-current-destructive-command)
;; repeated search through command history
(setq viper-intermediate-command
'repeating-display-destructive-command)
;; first search through command history--set temp ring
(setq viper-temp-command-ring (ring-copy viper-command-ring)))
(setq cmd (if next
(viper-special-ring-rotate1 viper-temp-command-ring 1)
(viper-special-ring-rotate1 viper-temp-command-ring -1)))
(if (null cmd)
()
(setq viper-d-com cmd))
(viper-display-current-destructive-command)))