[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emulation/viper-cmd.el,v
From: |
Michael Kifer |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emulation/viper-cmd.el,v |
Date: |
Mon, 23 Oct 2006 19:20:16 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Michael Kifer <kifer> 06/10/23 19:20:15
Index: lisp/emulation/viper-cmd.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emulation/viper-cmd.el,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- lisp/emulation/viper-cmd.el 18 Sep 2006 19:22:31 -0000 1.57
+++ lisp/emulation/viper-cmd.el 23 Oct 2006 19:20:15 -0000 1.58
@@ -408,7 +408,6 @@
)
-
(defun viper-adjust-keys-for (state)
"Make necessary adjustments to keymaps before entering STATE."
(cond ((memq state '(insert-state replace-state))
@@ -1272,12 +1271,13 @@
(while (viper= char ?U)
(viper-describe-arg cmd-info)
(setq char (read-char)))
- ;; `char' is a movement cmd, a digit arg cmd, or a register cmd---so we
- ;; execute it at the very end
+ ;; `char' is a movement cmd, a digit arg cmd, or a register cmd---so
+ ;; we execute it at the very end
(or (viper-movement-command-p char)
(viper-digit-command-p char)
(viper-regsuffix-command-p char)
(viper= char ?!) ; bang command
+ (viper= char ?g) ; the gg command (like G0)
(error ""))
(setq cmd-to-exec-at-end
(viper-exec-form-in-vi
@@ -1298,9 +1298,10 @@
(setq prefix-arg nil)
(cond
;; If we change ?C to ?c here, then cc will enter replacement mode
- ;; rather than deleting lines. However, it will affect 1 less line than
- ;; normal. We decided to not use replacement mode here and follow Vi,
- ;; since replacement mode on n full lines can be achieved with nC.
+ ;; rather than deleting lines. However, it will affect 1 less line
+ ;; than normal. We decided to not use replacement mode here and
+ ;; follow Vi, since replacement mode on n full lines can be achieved
+ ;; with nC.
((equal com '(?c . ?c)) (viper-line (cons value ?C)))
((equal com '(?d . ?d)) (viper-line (cons value ?D)))
((equal com '(?d . ?y)) (viper-yank-defun))
@@ -1309,6 +1310,8 @@
((equal com '(?> . ?>)) (viper-line (cons value ?>)))
((equal com '(?! . ?!)) (viper-line (cons value ?!)))
((equal com '(?= . ?=)) (viper-line (cons value ?=)))
+ ;; gg acts as G0
+ ((equal (car com) ?g) (viper-goto-line 0))
(t (error "")))))
(if cmd-to-exec-at-end
@@ -1733,6 +1736,7 @@
(max viper-com-point (point))))
((viper= char ?g)
(push-mark viper-com-point t)
+ ;; execute the last emacs kbd macro on each line of the region
(viper-global-execute))
((viper= char ?q)
(push-mark viper-com-point t)
@@ -3996,6 +4000,7 @@
(defun viper-buffer-search-enable (&optional c)
(cond (c (setq viper-buffer-search-char c))
((null viper-buffer-search-char)
+ ;; ?g acts as a default value for viper-buffer-search-char
(setq viper-buffer-search-char ?g)))
(define-key viper-vi-basic-map
(cond ((viper-characterp viper-buffer-search-char)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/emulation/viper-cmd.el,v,
Michael Kifer <=