Spelling fix.
[bpt/emacs.git] / lisp / emulation / vip.el
index 6f4f0ce..09456e6 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-2014 Free Software
+;; Foundation, Inc.
 
 ;; Author: Masahiko Sato <ms@sail.stanford.edu>
 ;; Keywords: emulations
@@ -159,7 +159,7 @@ If nil then it is bound to `delete-backward-char'."
 
 (defvar vip-inhibit-startup-message nil)
 
-(defvar vip-startup-file (convert-standard-filename "~/.vip")
+(defvar vip-startup-file (locate-user-emacs-file "vip" ".vip")
   "Filename used as startup file for vip.")
 \f
 ;; key bindings
@@ -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))
@@ -774,7 +775,7 @@ to vip-d-com for later use by vip-repeat"
                  (if (= com ?!)
                      (setq vip-last-shell-com (vip-read-string "!"))
                    vip-last-shell-com)
-                 t)))
+                 t t)))
              ((= com ?=)
               (save-excursion
                 (set-mark vip-com-point)
@@ -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
@@ -3041,7 +3042,7 @@ vip-s-string"
          (goto-char beg)
          (set-mark end)
          (vip-enlarge-region (point) (mark))
-         (shell-command-on-region (point) (mark) command t))
+         (shell-command-on-region (point) (mark) command t t))
        (goto-char beg)))))
 
 (defun ex-line-no ()