]> code.delx.au - gnu-emacs/blobdiff - lisp/emulation/viper-ex.el
Merge from emacs--devo--0
[gnu-emacs] / lisp / emulation / viper-ex.el
index 9f33bdbad53da48b005aae1fdebb170306343045..f9f080345826e2e748915395b1950c6b9fcced92 100644 (file)
@@ -1,6 +1,7 @@
 ;;; viper-ex.el --- functions implementing the Ex commands for Viper
 
-;; Copyright (C) 1994, 95, 96, 97, 98, 2000, 01, 02, 04, 05 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003,
+;;   2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
@@ -18,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -58,7 +59,7 @@
 (require 'viper-util)
 
 (defgroup viper-ex nil
-  "Viper support for Ex commands"
+  "Viper support for Ex commands."
   :prefix "ex-"
   :group 'viper)
 
 ;;; Variables
 
 (defconst viper-ex-work-buf-name " *ex-working-space*")
-(defconst viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name))
+(defvar viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name))
 (defconst viper-ex-tmp-buf-name " *ex-tmp*")
 (defconst viper-ex-print-buf-name " *ex-print*")
-(defconst viper-ex-print-buf (get-buffer-create viper-ex-print-buf-name))
+(defvar viper-ex-print-buf (get-buffer-create viper-ex-print-buf-name))
 
 
 ;;; ex-commands...
 
 ;; If this is a one-letter magic command, splice in args.
 (defun ex-splice-args-in-1-letr-cmd (key list)
-  (let ((onelet (ex-cmd-is-one-letter (assoc (substring key 0 1) list))))
-    (if onelet
+  (let ((oneletter (ex-cmd-is-one-letter (assoc (substring key 0 1) list))))
+    (if oneletter
        (list key
-             (append (cadr onelet)
+             (append (cadr oneletter)
                      (if (< 1 (length key)) (list (substring key 1))))
-             (caddr onelet)))
+             (car (cdr (cdr oneletter))) ))
        ))
 
 
@@ -1589,7 +1590,7 @@ reversed."
 
 ;; Ex print working directory
 (defun ex-pwd ()
-  (message default-directory))
+  (message "%s" default-directory))
 
 ;; Ex quit command
 (defun ex-quit ()
@@ -2229,7 +2230,7 @@ Type 'mak ' (including the space) to run make with no args."
                       (if (buffer-modified-p) "[Modified]" "[Unchanged]")))
     (if (< (+ 1 (length info) (length file))
           (window-width (minibuffer-window)))
-       (message (concat file " " info))
+       (message "%s" (concat file " " info))
       (save-window-excursion
        (with-output-to-temp-buffer " *viper-info*"
          (princ (concat "\n" file "\n\n\t" info "\n\n")))