[comp.emacs] Changes to things

pedz@bobkat.UUCP (Pedz Thing) (09/04/87)

O.k. folks here are my changes to 18.47 which I have made to all of the previous
versions but never got stuck in.  First of all, etags is not written as it should
be.  There is no reason to have two compiled versions on the disk.  It should look
at argv[0] to determine if it should act like etags or like ctags.  Also, the ``feature''
that etags reverts to ctags if any option is given is stupid.

The changes to vip mode attempt to make it closer to vi then the original.  There
are some basic problems in the philosophy.  vi never puts you on the carrage
return while vip did.  This version fixes many of those problems but not all.
The same is true with the last line of the file.  This cases `x' and `dd' (for
example) to not work right.  (Not to mention many really wierd key map changes
the original had.)

Last, I changed compile.el so that it uses the concept of a project.  This change
is not completed yet since there needs to be a simular change to tags as well as
the ability to change projects.  The problem I am trying to solve is that some
projects take up multiple directories and finding the Makefile in these cases
is more than complex than just using the current directory.  More changes to
compile.el will follow to allow more than one compilation at the same time and the
ability to switch between projects easily.  I do not work on a single thing at a time
and then wait for the compile to finish.  I frequently flip between two or three
projects at the same time.  If you NEVER do this then you probably do not need these
changes.


*** etc/Makefile.old	Mon Aug 31 15:55:48 1987
--- etc/Makefile	Fri Sep  4 12:15:11 1987
***************
*** 14,20
  	./test-distrib
  
  etags: etags.c
! 	cc -o etags ${CFLAGS} -DETAGS etags.c
  
  ctags: etags.c
  	cc -o ctags ${CFLAGS} -DCTAGS etags.c

--- 14,20 -----
  	./test-distrib
  
  etags: etags.c
! 	cc -o etags ${CFLAGS} etags.c
  
  ctags: etags
  	rm -f ctags
***************
*** 16,23
  etags: etags.c
  	cc -o etags ${CFLAGS} -DETAGS etags.c
  
! ctags: etags.c
! 	cc -o ctags ${CFLAGS} -DCTAGS etags.c
  
  loadst: loadst.c ../src/config.h
  	cc -o loadst ${CFLAGS} loadst.c

--- 16,24 -----
  etags: etags.c
  	cc -o etags ${CFLAGS} etags.c
  
! ctags: etags
! 	rm -f ctags
! 	ln etags ctags
  
  loadst: loadst.c ../src/config.h
  	cc -o loadst ${CFLAGS} loadst.c
*** etc/etags.c.old	Mon Aug 31 15:55:44 1987
--- etc/etags.c	Fri Sep  4 12:14:50 1987
***************
*** 84,93
  #include <stdio.h>
  #include <ctype.h>
  
! /* Define the symbol ETAGS to make the program "etags",
!  which makes emacs-style tag tables by default.
!  Define CTAGS to make the program "ctags" compatible with the usual one.
!  Default is ETAGS.  */
  
  #ifndef CTAGS
  #ifndef ETAGS

--- 84,91 -----
  #include <stdio.h>
  #include <ctype.h>
  
!  /* Change so that the program behaves according to how it is called. */
!  /* This saves the disk space for two copies of the same program */
  
  #define	reg	register
  #define	logical	char
***************
*** 89,100
   Define CTAGS to make the program "ctags" compatible with the usual one.
   Default is ETAGS.  */
  
- #ifndef CTAGS
- #ifndef ETAGS
- #define ETAGS 1
- #endif
- #endif
- 
  #define	reg	register
  #define	logical	char
  

--- 87,92 -----
   /* Change so that the program behaves according to how it is called. */
   /* This saves the disk space for two copies of the same program */
  
  #define	reg	register
  #define	logical	char
  
***************
*** 204,209
  #endif /* VMS */
  
  
  main(ac,av)
       int	ac;
       char	*av[];

--- 196,203 -----
  #endif /* VMS */
  
  
+ char *progname;
+ 
  main(ac,av)
       int	ac;
       char	*av[];
***************
*** 210,215
  {
    char cmd[100];
    int i;
  
  #ifdef ETAGS
    eflag = 1;

--- 204,210 -----
  {
    char cmd[100];
    int i;
+   char *rindex();
  
    if (progname = rindex(av[0], '/'))
      ++progname;
***************
*** 211,219
    char cmd[100];
    int i;
  
! #ifdef ETAGS
!   eflag = 1;
! #endif
  
    while (ac > 1 && av[1][0] == '-')
      {

--- 206,215 -----
    int i;
    char *rindex();
  
!   if (progname = rindex(av[0], '/'))
!     ++progname;
!   else
!     progname = av[0];
  
    eflag = !strcmp(progname, "etags");
  
***************
*** 215,220
    eflag = 1;
  #endif
  
    while (ac > 1 && av[1][0] == '-')
      {
        eflag = 0;

--- 211,218 -----
    else
      progname = av[0];
  
+   eflag = !strcmp(progname, "etags");
+ 
    while (ac > 1 && av[1][0] == '-')
      {
        for (i=1; av[1][i]; i++)
***************
*** 217,223
  
    while (ac > 1 && av[1][0] == '-')
      {
-       eflag = 0;
        for (i=1; av[1][i]; i++)
  	{
  	  switch(av[1][i])

--- 215,220 -----
  
    while (ac > 1 && av[1][0] == '-')
      {
        for (i=1; av[1][i]; i++)
  	{
  	  switch(av[1][i])
***************
*** 1125,1131
   * look for (set! xyzzy
   */
  
- static get_scheme ();
  Scheme_funcs (fi)
       FILE *fi;
  {

--- 1122,1127 -----
   * look for (set! xyzzy
   */
  
  Scheme_funcs (fi)
       FILE *fi;
  {
***************
*** 1147,1153
  	  while (!isspace(*dbp)) dbp++;
            /* Skip over open parens and white space */
            while (*dbp && (isspace(*dbp) || *dbp == '(')) dbp++;
! 	  get_scheme ();
  	}
        if (dbp[0] == '(' && 
  	  (dbp[1] == 'S' || dbp[1] == 's') &&

--- 1143,1149 -----
  	  while (!isspace(*dbp)) dbp++;
            /* Skip over open parens and white space */
            while (*dbp && (isspace(*dbp) || *dbp == '(')) dbp++;
! 	  Scheme_getit();
  	}
        if (dbp[0] == '(' && 
  	  (dbp[1] == 'S' || dbp[1] == 's') &&
***************
*** 1159,1165
  	  while (!isspace(*dbp)) dbp++;
            /* Skip over white space */
            while (isspace(*dbp)) dbp++;
! 	  get_scheme ();
  	}
      }
  }

--- 1155,1161 -----
  	  while (!isspace(*dbp)) dbp++;
            /* Skip over white space */
            while (isspace(*dbp)) dbp++;
! 	  Scheme_getit();
  	}
      }
  }
***************
*** 1163,1171
  	}
      }
  }
! 
! static
! get_scheme()
  {
    register char *cp;
    char c;

--- 1159,1165 -----
  	}
      }
  }
! Scheme_getit()
  {
    register char *cp;
    char c;
***************
*** 1506,1516
  error (s1, s2)
       char *s1, *s2;
  {
! #ifdef CTAGS
!   printf ("ctags: ");
! #else
!   printf ("etags: ");
! #endif
    printf (s1, s2);
    printf ("\n");
  }

--- 1500,1506 -----
  error (s1, s2)
       char *s1, *s2;
  {
!   printf ("%s: ", progname);
    printf (s1, s2);
    printf ("\n");
  }
*** etc/compile.el.old	Fri Sep  4 10:55:58 1987
--- etc/compile.el	Fri Sep  4 10:55:57 1987
***************
*** 42,48
    "Message to print when no more matches for compilation-error-regexp are found")
  
  (defvar compilation-error-regexp
!   "\\([^ \n]+\\(: *\\|, line \\|(\\)[0-9]+\\)\\|\\([0-9]+.*of *[^ \n]+\\)"
    "Regular expression for filename/linenumber in error in compilation log.")
  
  (defun compile (command)

--- 42,48 -----
    "Message to print when no more matches for compilation-error-regexp are found")
  
  (defvar compilation-error-regexp
!   "\\([^ \n]+\\(: *\\|, line \\|(\\)[0-9]+\\)\\|\\([0-9]+[ \t]*of *[^ \n]+\\)"
    "Regular expression for filename/linenumber in error in compilation log.")
  
  (progn
***************
*** 45,50
    "\\([^ \n]+\\(: *\\|, line \\|(\\)[0-9]+\\)\\|\\([0-9]+.*of *[^ \n]+\\)"
    "Regular expression for filename/linenumber in error in compilation log.")
  
  (defun compile (command)
    "Compile the program including the current buffer.  Default: run make.
  Runs COMMAND, a shell command, in a separate process asynchronously

--- 45,56 -----
    "\\([^ \n]+\\(: *\\|, line \\|(\\)[0-9]+\\)\\|\\([0-9]+[ \t]*of *[^ \n]+\\)"
    "Regular expression for filename/linenumber in error in compilation log.")
  
+ (progn
+   (set-buffer (get-buffer "*scratch*"))
+   (defvar project-directory default-directory
+     "Directory to execute compilation commands from"))
+ (make-variable-buffer-local 'project-directory)
+ 
  (defun compile (command)
    "Compile the program including the current buffer.  Default: run make.
  Runs COMMAND, a shell command, in a separate process asynchronously
***************
*** 82,88
    (setq compilation-process
  	(start-process "compilation" "*compilation*"
  		       shell-file-name
! 		       "-c" (concat "exec " command)))
    (with-output-to-temp-buffer "*compilation*"
      (princ "cd ")
      (princ default-directory)

--- 88,94 -----
    (setq compilation-process
  	(start-process "compilation" "*compilation*"
  		       shell-file-name
! 		       "-c" (concat "cd " project-directory " ; " command)))
    (with-output-to-temp-buffer "*compilation*"
      (princ "cd ")
      (princ project-directory)
***************
*** 85,92
  		       "-c" (concat "exec " command)))
    (with-output-to-temp-buffer "*compilation*"
      (princ "cd ")
!     (princ default-directory)
!     (terpri)
      (princ command)
      (terpri))
    (let ((regexp compilation-error-regexp))

--- 91,98 -----
  		       "-c" (concat "cd " project-directory " ; " command)))
    (with-output-to-temp-buffer "*compilation*"
      (princ "cd ")
!     (princ project-directory)
!     (princ " ; ")
      (princ command)
      (terpri))
    (let ((regexp compilation-error-regexp))
*** etc/vip.el.old	Mon Aug 31 15:57:28 1987
--- etc/vip.el	Fri Sep  4 11:01:12 1987
***************
*** 16,21
    
  (make-variable-buffer-local 'emacs-local-map)
  (make-variable-buffer-local 'insert-local-map)
  
  (defvar insert-point nil
    "Remember insert point as a marker. \(buffer specific\)")

--- 16,22 -----
    
  (make-variable-buffer-local 'emacs-local-map)
  (make-variable-buffer-local 'insert-local-map)
+ (make-variable-buffer-local 'from-insert-mode)
  
  (defvar insert-point nil
    "Remember insert point as a marker. \(buffer specific\)")
***************
*** 158,164
  	       (if (eq current-mode 'insert-mode)
  		   (progn
  		     (vi-copy-region-as-kill (point) insert-point)
! 		     (repeat-insert-command))
  		 (setq emacs-local-map (current-local-map)
  		       insert-local-map (vi-copy-keymap (current-local-map))))
  	       (change-mode-line "Vi:   ")

--- 159,166 -----
  	       (if (eq current-mode 'insert-mode)
  		   (progn
  		     (vi-copy-region-as-kill (point) insert-point)
! 		     (repeat-insert-command)
! 		     (and (not (bolp)) (backward-char 1)))
  		 (setq emacs-local-map (current-local-map)
  		       insert-local-map (vi-copy-keymap (current-local-map))))
  	       (change-mode-line "Vi:   ")
***************
*** 170,175
  			 insert-local-map
  			 (vi-copy-keymap (current-local-map))))
  	       (change-mode-line "Insert")
  	       (use-local-map insert-local-map)
  	       (define-key insert-local-map "\e" 'change-mode-to-vi)
  	       (define-key insert-local-map "\C-z" 'vi-ESC)

--- 172,178 -----
  			 insert-local-map
  			 (vi-copy-keymap (current-local-map))))
  	       (change-mode-line "Insert")
+ 	       (setq from-insert-mode t)
  	       (use-local-map insert-local-map)
  	       (define-key insert-local-map "\e" 'change-mode-to-vi)
  	       (define-key insert-local-map "\C-z" 'vi-ESC)
***************
*** 203,208
  (defun change-mode-to-vi ()
    "()  Change mode to vi."
    (interactive)
    (change-mode 'vi-mode))
  
  (defun change-mode-to-insert ()

--- 206,212 -----
  (defun change-mode-to-vi ()
    "()  Change mode to vi."
    (interactive)
+   (setq from-insert-mode nil)
    (change-mode 'vi-mode))
  
  (defun change-mode-to-insert ()
***************
*** 442,448
  	     (t (error "strange arg"))))
      (quit
       (setq use-register nil)
!      (signal 'quit nil))))
  
  (defun p-val (arg)
    "(ARG)  Get value part of prefix-argument ARG."

--- 446,453 -----
  	     (t (error "strange arg"))))
      (quit
       (setq use-register nil)
!      (signal 'quit nil)))
!   (if (eobp) (forward-line -1)))
  
  (defun p-val (arg)
    "(ARG)  Get value part of prefix-argument ARG."
***************
*** 605,611
  	       (special-prefix-com (- com 128)))))
      (setq d-com (list m-com val (if (or (= com ?c) (= com ?C) (= com ?!))
  				    (- com) com)
! 		      reg))))
  
  (defun vi-repeat (arg)
    "(ARG)  Re-excute last destructive command.  d-com has the form

--- 610,617 -----
  	       (special-prefix-com (- com 128)))))
      (setq d-com (list m-com val (if (or (= com ?c) (= com ?C) (= com ?!))
  				    (- com) com)
! 		      reg))
!     (if (and (eolp) (not (bolp))) (backward-char 1))))
  
  (defun vi-repeat (arg)
    "(ARG)  Re-excute last destructive command.  d-com has the form
***************
*** 649,654
    (message "undo!")
    (undo-start)
    (undo-more 2)
    (setq this-command 'vi-undo))
  
  (defun vi-undo-more () ""

--- 655,661 -----
    (message "undo!")
    (undo-start)
    (undo-more 2)
+   (if (and (eolp) (not (bolp))) (backward-char 1))
    (setq this-command 'vi-undo))
  
  (defun vi-undo-more () ""
***************
*** 654,659
  (defun vi-undo-more () ""
    (message "undo more!")
    (undo-more 1)
    (setq this-command 'vi-undo))
  
  

--- 661,667 -----
  (defun vi-undo-more () ""
    (message "undo more!")
    (undo-more 1)
+   (if (and (eolp) (not (bolp))) (backward-char 1))
    (setq this-command 'vi-undo))
  
  
***************
*** 912,918
    (interactive "P")
    (let ((val (p-val arg)) (com (getcom arg)))
      (if com (move-marker com-point (point)))
!     (forward-char val)
      (if com (execute-com 'vi-forward-char val com))))
  
  (defun vi-backward-char (arg)

--- 920,927 -----
    (interactive "P")
    (let ((val (p-val arg)) (com (getcom arg)))
      (if com (move-marker com-point (point)))
!     (skip-chars-forward "^\n" (+ (point) val))
!     (if (and (eolp) (not (bolp))) (backward-char 1))
      (if com (execute-com 'vi-forward-char val com))))
  
  (defun vi-backward-char (arg)
***************
*** 921,927
    (interactive "P")
    (let ((val (p-val arg)) (com (getcom arg)))
      (if com (move-marker com-point (point)))
!     (backward-char val)
      (if com (execute-com 'vi-backward-char val com))))
  
  

--- 930,936 -----
    (interactive "P")
    (let ((val (p-val arg)) (com (getcom arg)))
      (if com (move-marker com-point (point)))
!     (skip-chars-backward "^\n" (- (point) val))
      (if com (execute-com 'vi-backward-char val com))))
  
  
***************
*** 927,932
  
  ;; word command
  
  (defun vi-forward-word (arg) ""
    (interactive "P")
    (let ((val (p-val arg))

--- 936,955 -----
  
  ;; word command
  
+ (defun vi-set-syntax-table ()
+   "Change all word entries which are not in the set [A-Za-z0-9] to symbol
+ entries"
+   (interactive)
+   (let ((tab (syntax-table))
+ 	(i 0))
+     (while (< i 255)
+       (and (= (char-syntax i) ?w)
+ 	   (not (or (and (>= i ?a) (<= i ?z))
+ 		    (and (>= i ?A) (<= i ?Z))
+ 		    (and (>= i ?0) (<= i ?9))))
+ 	   (modify-syntax-entry i "_" tab))
+       (setq i (1+ i)))))
+ 
  (defun vi-forward-word (arg) ""
    (interactive "P")
    (let ((val (p-val arg))
***************
*** 932,939
    (let ((val (p-val arg))
  	(com (getcom arg)))
      (if com (move-marker com-point (point)))
!     (forward-word val)
!     (skip-chars-forward " \t\n")
      (if com
  	(progn
  	  (if (or (= com ?c) (= com (- ?c)))

--- 955,962 -----
    (let ((val (p-val arg))
  	(com (getcom arg)))
      (if com (move-marker com-point (point)))
!     (re-search-forward "\\s +.\\|.\\b\\S " nil 0 val)
!     (backward-char 1)
      (if com
  	(progn
  	  (if (or (= com ?c) (= com (- ?c)))
***************
*** 937,948
      (if com
  	(progn
  	  (if (or (= com ?c) (= com (- ?c)))
! 	      (progn (backward-word 1) (forward-word 1)))
! 	  (if (or (= com ?d) (= com ?y))
! 	      (progn
! 		(backward-word 1)
! 		(forward-word 1)
! 		(skip-chars-forward " \t")))
  	  (execute-com 'vi-forward-word val com)))))
  
  (defun vi-end-of-word (arg)

--- 960,966 -----
      (if com
  	(progn
  	  (if (or (= com ?c) (= com (- ?c)))
! 	      (while (looking-back "\\s ") (backward-char 1)))
  	  (execute-com 'vi-forward-word val com)))))
  
  (defun vi-end-of-word (arg)
***************
*** 951,959
    (let ((val (p-val arg))
  	(com (getcom arg)))
      (if com (move-marker com-point (point)))
!     (forward-char)
!     (forward-word val)
!     (backward-char)
      (if com
  	(progn
  	  (forward-char)

--- 969,976 -----
    (let ((val (p-val arg))
  	(com (getcom arg)))
      (if com (move-marker com-point (point)))
!     (re-search-forward "..\\>.\\|.\\S \\s \\|.\\S \\<." nil 0 val)
!     (backward-char 2)
      (if com
  	(progn
  	  (forward-char)
***************
*** 964,970
    (let ((val (p-val arg))
  	(com (getcom arg)))
      (if com (move-marker com-point (point)))
!     (backward-word val)
      (if com (execute-com 'vi-backward-word val com))))
  
  (defun vi-forward-Word (arg) ""

--- 981,990 -----
    (let ((val (p-val arg))
  	(com (getcom arg)))
      (if com (move-marker com-point (point)))
!     (loop val
! 	  (progn
! 	    (re-search-backward ".\\b\\S \\|\\s \\S ")
! 	    (forward-char 1)))
      (if com (execute-com 'vi-backward-word val com))))
  
  (defun vi-forward-Word (arg) ""
***************
*** 1025,1030
    (let ((val (p-val arg)) (com (getcom arg)))
      (if com (move-marker com-point (point)))
      (end-of-line val)
      (if com (execute-com 'vi-goto-eol val com))))
  
  (defun vi-next-line (arg)

--- 1045,1052 -----
    (let ((val (p-val arg)) (com (getcom arg)))
      (if com (move-marker com-point (point)))
      (end-of-line val)
+     (if (not (or (bolp) (and com (or (= com ?d) (= com ?c)))))
+ 	(backward-char 1))
      (if com (execute-com 'vi-goto-eol val com))))
  
  (defun vi-next-line (arg)
***************
*** 1029,1036
  
  (defun vi-next-line (arg)
    (interactive "P")
!   (let ((val (p-val arg)) (com (getCom arg)))
!     (if com (move-marker com-point (point)))
      (next-line val)
      (setq this-command 'next-line)
      (if com (execute-com 'vi-next-line val com))))

--- 1051,1060 -----
  
  (defun vi-next-line (arg)
    (interactive "P")
!   (let ((val (p-val arg))
! 	(com (getCom arg))
! 	(cur (point)))
!     (if com (move-marker com-point cur))
      (next-line val)
      (if (eobp)
  	(progn
***************
*** 1032,1037
    (let ((val (p-val arg)) (com (getCom arg)))
      (if com (move-marker com-point (point)))
      (next-line val)
      (setq this-command 'next-line)
      (if com (execute-com 'vi-next-line val com))))
  

--- 1056,1066 -----
  	(cur (point)))
      (if com (move-marker com-point cur))
      (next-line val)
+     (if (eobp)
+ 	(progn
+ 	  (goto-char cur)
+ 	  (error "")))
+     (if (and (eolp) (not (bolp))) (backward-char 1))
      (setq this-command 'next-line)
      (if com (execute-com 'vi-next-line val com))))
  
***************
*** 1048,1053
    (let ((val (p-val arg)) (com (getCom arg)))
      (if com (move-marker com-point (point)))
      (next-line (- val))
      (setq this-command 'previous-line)
      (if com (execute-com 'vi-previous-line val com))))
  

--- 1077,1083 -----
    (let ((val (p-val arg)) (com (getCom arg)))
      (if com (move-marker com-point (point)))
      (next-line (- val))
+     (if (and (eolp) (not (bolp))) (backward-char 1))
      (setq this-command 'previous-line)
      (if com (execute-com 'vi-previous-line val com))))
  
***************
*** 1079,1084
  	(goto-char (point-max))
        (goto-char (point-min))
        (forward-line (1- val)))
      (back-to-indentation)
      (if com (execute-com 'vi-goto-line val com))))
  

--- 1109,1115 -----
  	(goto-char (point-max))
        (goto-char (point-min))
        (forward-line (1- val)))
+     (if (eobp) (forward-line -1))
      (back-to-indentation)
      (if com (execute-com 'vi-goto-line val com))))
  
***************
*** 1572,1578
  	       (+ use-register 32) (point) (- (point) val) nil)
  	    (copy-to-register use-register (point) (- (point) val) nil))
  	  (setq use-register nil)))
!     (delete-char val t)))
  
  (defun vi-delete-backward-char (arg)
    (interactive "P")

--- 1603,1610 -----
  	       (+ use-register 32) (point) (- (point) val) nil)
  	    (copy-to-register use-register (point) (- (point) val) nil))
  	  (setq use-register nil)))
!     (delete-char val t)
!     (if (and (eolp) (not (bolp))) (backward-char 1))))
  
  (defun vi-delete-backward-char (arg)
    (interactive "P")
***************
*** 1764,1770
  (define-key vi-command-mode-map "\C-f" 'vi-scroll)
  (define-key vi-command-mode-map "\C-g" 'vi-keyboard-quit)
  (define-key vi-command-mode-map "\C-h" 'help-command)
! (define-key vi-command-mode-map "\C-m" 'vi-scroll-back)
  (define-key vi-command-mode-map "\C-n" 'vi-other-window)
  (define-key vi-command-mode-map "\C-o" 'vi-ctl-open-line)
  (define-key vi-command-mode-map "\C-u" 'vi-scroll-down)

--- 1796,1802 -----
  (define-key vi-command-mode-map "\C-f" 'vi-scroll)
  (define-key vi-command-mode-map "\C-g" 'vi-keyboard-quit)
  (define-key vi-command-mode-map "\C-h" 'help-command)
! (define-key vi-command-mode-map "\C-m" 'vi-next-line-at-bol)
  (define-key vi-command-mode-map "\C-n" 'vi-other-window)
  (define-key vi-command-mode-map "\C-o" 'vi-ctl-open-line)
  (define-key vi-command-mode-map "\C-u" 'vi-scroll-down)
***************
*** 1773,1779
  (define-key vi-command-mode-map "\C-z" 'change-mode-to-emacs)
  (define-key vi-command-mode-map "\e" 'vi-ESC)
  
! (define-key vi-command-mode-map " " 'vi-scroll)
  (define-key vi-command-mode-map "!" 'vi-command-argument)
  (define-key vi-command-mode-map "\"" 'vi-command-argument)
  (define-key vi-command-mode-map "#" 'vi-command-argument)

--- 1805,1811 -----
  (define-key vi-command-mode-map "\C-z" 'change-mode-to-emacs)
  (define-key vi-command-mode-map "\e" 'vi-ESC)
  
! (define-key vi-command-mode-map " " 'vi-forward-char)
  (define-key vi-command-mode-map "!" 'vi-command-argument)
  (define-key vi-command-mode-map "\"" 'vi-command-argument)
  (define-key vi-command-mode-map "#" 'vi-command-argument)
***************
*** 1832,1838
  (define-key vi-command-mode-map "U" 'vi-nil)
  (define-key vi-command-mode-map "V" 'vi-find-file-other-window)
  (define-key vi-command-mode-map "W" 'vi-forward-Word)
! (define-key vi-command-mode-map "X" 'ctl-x-equivalent)
  (define-key vi-command-mode-map "Y" 'vi-yank-line)
  (define-key vi-command-mode-map "ZZ" 'save-buffers-kill-emacs)
  

--- 1864,1870 -----
  (define-key vi-command-mode-map "U" 'vi-nil)
  (define-key vi-command-mode-map "V" 'vi-find-file-other-window)
  (define-key vi-command-mode-map "W" 'vi-forward-Word)
! (define-key vi-command-mode-map "X" 'vi-delete-backward-char)
  (define-key vi-command-mode-map "Y" 'vi-yank-line)
  (define-key vi-command-mode-map "ZZ" 'save-buffers-kill-emacs)
  
***************
*** 1879,1885
  (define-key vi-command-mode-map "|" 'vi-goto-col)
  (define-key vi-command-mode-map "}" 'vi-forward-paragraph)
  (define-key vi-command-mode-map "~" 'vi-nil)
! (define-key vi-command-mode-map "\177" 'vi-delete-backward-char)
  
  (define-key ctl-x-map "3" 'buffer-in-two-windows)
  (define-key ctl-x-map "\C-i" 'insert-file)

--- 1911,1917 -----
  (define-key vi-command-mode-map "|" 'vi-goto-col)
  (define-key vi-command-mode-map "}" 'vi-forward-paragraph)
  (define-key vi-command-mode-map "~" 'vi-nil)
! (define-key vi-command-mode-map "\177" 'vi-beep)
  
  (define-key ctl-x-map "3" 'buffer-in-two-windows)
  (define-key ctl-x-map "\C-i" 'insert-file)
***************
*** 1884,1890
  (define-key ctl-x-map "3" 'buffer-in-two-windows)
  (define-key ctl-x-map "\C-i" 'insert-file)
  
! (defun vip-version ()
    (interactive)
    (message "VIP version 2.8 of Apr 18, 1987"))
  

--- 1916,1922 -----
  (define-key ctl-x-map "3" 'buffer-in-two-windows)
  (define-key ctl-x-map "\C-i" 'insert-file)
  
! (defun vi-beep ()
    (interactive)
    (beep))
  
***************
*** 1886,1891
  
  (defun vip-version ()
    (interactive)
    (message "VIP version 2.8 of Apr 18, 1987"))
  
  

--- 1918,1926 -----
  
  (defun vi-beep ()
    (interactive)
+   (beep))
+ 
+ (defun vip-version ()
    (message "VIP version 2.8 of Apr 18, 1987"))
  
  
***************
*** 2424,2429
  	((string= ex-token "visual") (ex-edit))
  	((string= ex-token "write") (ex-write nil))
  	((string= ex-token "wq") (ex-write t))
  	((string= ex-token "yank") (ex-yank))
  	((string= ex-token "!") (ex-command))
  	((string= ex-token "=") (ex-line-no))

--- 2459,2465 -----
  	((string= ex-token "visual") (ex-edit))
  	((string= ex-token "write") (ex-write nil))
  	((string= ex-token "wq") (ex-write t))
+ 	((string= ex-token "xit") (ex-write t))
  	((string= ex-token "yank") (ex-yank))
  	((string= ex-token "!") (ex-command))
  	((string= ex-token "=") (ex-line-no))
***************
*** 2447,2453
  	     (string= ex-token "rewind")
  	     (string= ex-token "source")
  	     (string= ex-token "unabbreviate")
- 	     (string= ex-token "xit")
  	     (string= ex-token "z")
  	     )
  	 (error (format "%s: not implemented in VIP" ex-token)))

--- 2483,2488 -----
  	     (string= ex-token "rewind")
  	     (string= ex-token "source")
  	     (string= ex-token "unabbreviate")
  	     (string= ex-token "z")
  	     )
  	 (error (format "%s: not implemented in VIP" ex-token)))
-- 
Cute signature line employing many literary allusions and puns.
Standard disclaimer concerning my mental incompetance.
Perry Smith a.k.a. (Pedz Thing)
pedz@bobkat or {ti-csl,infotel}!pollux!bobkat!pedz