]> code.delx.au - gnu-emacs/blobdiff - lisp/emulation/vip.el
Merge from emacs-24; up to 2012-12-22T02:59:08Z!cyd@gnu.org
[gnu-emacs] / lisp / emulation / vip.el
index 6f4f0ce80ec6fe8d00dd9bc67e203aecb293018e..e086f26e8ab401e4786acd49b67009f312f3c365 100644 (file)
@@ -1,7 +1,7 @@
 ;;; vip.el --- a VI Package for GNU Emacs
 
-;; Copyright (C) 1986-1988, 1992-1993, 1998, 2001-2011
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1986-1988, 1992-1993, 1998, 2001-2013 Free Software
+;; Foundation, Inc.
 
 ;; Author: Masahiko Sato <ms@sail.stanford.edu>
 ;; Keywords: emulations
@@ -183,6 +183,7 @@ If nil then it is bound to `delete-backward-char'."
     (define-key map "\C-z" 'vip-change-mode-to-emacs)
     (define-key map "\e" 'vip-ESC)
 
+    (define-key map [?\S-\ ] 'vip-scroll-back)
     (define-key map " " 'vip-scroll)
     (define-key map "!" 'vip-command-argument)
     (define-key map "\"" 'vip-command-argument)
@@ -307,10 +308,10 @@ If nil then it is bound to `delete-backward-char'."
 
 (defmacro vip-loop (count body)
   "(COUNT BODY) Execute BODY COUNT times."
-  (list 'let (list (list 'count count))
-       (list 'while (list '> 'count 0)
-             body
-             (list 'setq 'count (list '1- 'count)))))
+  `(let ((count ,count))
+     (while (> count 0)
+       ,body
+       (setq count (1- count)))))
 
 (defun vip-push-mark-silent (&optional location)
   "Set mark at LOCATION (point, by default) and push old mark on mark ring.
@@ -420,7 +421,7 @@ Type `n' to quit this window for now.\n")
        (goto-char (point-min))
        (if (y-or-n-p "Inhibit VIP startup message? ")
            (progn
-             (with-current-buffer 
+             (with-current-buffer
                   (find-file-noselect
                    (substitute-in-file-name vip-startup-file))
                (goto-char (point-max))
@@ -877,7 +878,7 @@ is the name of the register for COM."
   (if (> beg end) (exchange-point-and-mark)))
 
 (defun vip-global-execute ()
-  "Call last keyboad macro for each line in the region."
+  "Call last keyboard macro for each line in the region."
   (if (> (point) (mark)) (exchange-point-and-mark))
   (beginning-of-line)
   (call-last-kbd-macro)
@@ -1605,7 +1606,7 @@ used.  This behavior is controlled by the sign of prefix numeric value."
   "Show current buffer in two windows."
   (interactive)
   (delete-other-windows)
-  (split-window-vertically nil))
+  (split-window-below))
 
 \f
 ;; searching