anchor.diff:          (if (char= (character "!") (char arg 0))
               (concatenate 'string (buffer-command buffer) (subseq arg 1))
               arg))
  -  (do-command buffer)
  -  ) ;;CMD-SUBSHELL
  -
  -
  -
  -(DEFPARAMETER *COMMANDS*
  +  (do-command buffer))
  +
  +
  +
  +(defparameter *commands*
     '( ;;cmd from   to    argument     p   function
  -    ("t"  :CURR  :CURR  :CURR        T   CMD-COPY-LINES)
  -    ("m"  :CURR  :CURR  :CURR        T   CMD-MOVE-LINES)
  -    ("c"  :CURR  :CURR  NIL          T   CMD-CHANGE-LINES)
  -    ("#"  :CURR  :CURR  NIL          T   CMD-COMMENT)
  -    ("y"  :CURR  :CURR  NIL          T   CMD-COPY)
  -    ("d"  :CURR  :CURR  NIL          T   CMD-DELETE-LINES)
  -    ("p"  :CURR  :CURR  NIL          T   CMD-PRINT-LINES)
  -    ("n"  :CURR  :CURR  NIL          T   CMD-PRINT-LINES-AND-NUMBERS)
  -    ("l"  :CURR  :CURR  NIL          T   CMD-PRINT-LINES-UNAMBIGUOUSLY)
  -    ("s"  :CURR  :CURR  SUBSTITUTION T   CMD-SUBSTITUTE)
  -    ("j"  :CURR  :NEXT  NIL          T   CMD-JOIN-LINES)
  -    ("g"  :FIRST :LAST  REGEXP       NIL CMD-EDIT-MATCHING)
  -    ("v"  :FIRST :LAST  REGEXP       NIL CMD-EDIT-NOT-MATCHING)
  -    ("G"  :FIRST :LAST  REGEXP       T   CMD-USER-EDIT-MATCHING)
  -    ("V"  :FIRST :LAST  REGEXP       T   CMD-USER-EDIT-NOT-MATCHING)
  -    ("W"  :FIRST :LAST  STRING       NIL CMD-APPEND-FILE)
  -    ("w"  :FIRST :LAST  STRING       NIL CMD-WRITE-FILE)
  -    ("k"  NIL    :CURR  CHARACTER    T   CMD-MARK)
  -    ("a"  NIL    :CURR  NIL          T   CMD-APPEND)
  -    ("i"  NIL    :CURR  NIL          T   CMD-INSERT)
  -    ("x"  NIL    :CURR  NIL          T   CMD-PASTE)
  -    ("="  NIL    :LAST  NIL          T   CMD-PRINT-LINE-NUMBER)
  -    ("r"  NIL    :LAST  STRING       NIL CMD-READ-FILE)
  -    (NIL  NIL    :NEXT  NIL          NIL CMD-PRINT-LINES)
  -    ("z"  NIL    :NEXT  NUMBER       T   CMD-SCROLL-LINES)
  -    ("h"  NIL    NIL    NIL          T   CMD-PRINT-LAST-ERROR)
  -    ("q"  NIL    NIL    NIL          T   CMD-QUIT)
  -    ("Q"  NIL    NIL    NIL          T   CMD-QUIT-UNCONDITIONNALY)
  -    ("P"  NIL    NIL    NIL          T   CMD-TOGGLE-COMMAND-PROMPT)
  -    ("H"  NIL    NIL    NIL          T   CMD-TOGGLE-ERROR-EXPLANATIONS)
  -    ("u"  NIL    NIL    NIL          T   CMD-UNDO)
  -    ("e"  NIL    NIL    STRING       NIL CMD-EDIT-FILE)
  -    ("E"  NIL    NIL    STRING       NIL CMD-EDIT-FILE-UNCONDITIONALLY)
  -    ("f"  NIL    NIL    STRING       NIL CMD-SET-DEFAULT-FILENAME)
  -    ("!"  NIL    NIL    STRING       NIL CMD-SUBSHELL)
  -    ("wq" :FIRST :LAST  STRING       NIL CMD-WRITE-FILE-QUIT)
  -    )) ;;*COMMANDS*
  +    ("t"  :curr  :curr  :curr        t   cmd-copy-lines)
  +    ("m"  :curr  :curr  :curr        t   cmd-move-lines)
  +    ("c"  :curr  :curr  nil          t   cmd-change-lines)
  +    ("#"  :curr  :curr  nil          t   cmd-comment)
  +    ("y"  :curr  :curr  nil          t   cmd-copy)
  +    ("d"  :curr  :curr  nil          t   cmd-delete-lines)
  +    ("p"  :curr  :curr  nil          t   cmd-print-lines)
  +    ("n"  :curr  :curr  nil          t   cmd-print-lines-and-numbers)
  +    ("l"  :curr  :curr  nil          t   cmd-print-lines-unambiguously)
  +    ("s"  :curr  :curr  substitution t   cmd-substitute)
  +    ("j"  :curr  :next  nil          t   cmd-join-lines)
  +    ("g"  :first :last  regexp       nil cmd-edit-matching)
  +    ("v"  :first :last  regexp       nil cmd-edit-not-matching)
  +    ("G"  :first :last  regexp       t   cmd-user-edit-matching)
  +    ("V"  :first :last  regexp       t   cmd-user-edit-not-matching)
  +    ("W"  :first :last  string       nil cmd-append-file)
  +    ("w"  :first :last  string       nil cmd-write-file)
  +    ("k"  nil    :curr  character    t   cmd-mark)
  +    ("a"  nil    :curr  nil          t   cmd-append)
  +    ("i"  nil    :curr  nil          t   cmd-insert)
  +    ("x"  nil    :curr  nil          t   cmd-paste)
  +    ("="  nil    :last  nil          t   cmd-print-line-number)
  +    ("r"  nil    :last  string       nil cmd-read-file)
  +    (nil  nil    :next  nil          nil cmd-print-lines)
  +    ("z"  nil    :next  number       t   cmd-scroll-lines)
  +    ("h"  nil    nil    nil          t   cmd-print-last-error)
  +    ("q"  nil    nil    nil          t   cmd-quit)
  +    ("Q"  nil    nil    nil          t   cmd-quit-unconditionnaly)
  +    ("P"  nil    nil    nil          t   cmd-toggle-command-prompt)
  +    ("H"  nil    nil    nil          t   cmd-toggle-error-explanations)
  +    ("u"  nil    nil    nil          t   cmd-undo)
  +    ("e"  nil    nil    string       nil cmd-edit-file)
  +    ("E"  nil    nil    string       nil cmd-edit-file-unconditionally)
  +    ("f"  nil    nil    string       nil cmd-set-default-filename)
  +    ("!"  nil    nil    string       nil cmd-subshell)
  +    ("wq" :first :last  string       nil cmd-write-file-quit)))
   
   
   (dbg
    (push '("D"  nil    nil    nil          nil cmd-toggle-debug) *commands*)
  - (DEFUN cmd-toggle-debug (BUFFER FROM TO ARG)
  + (defun cmd-toggle-debug (buffer from to arg)
      ;; !command
      ;;         Executes  command  via  sh(1).  If the first character of
      ;;         command is `!', then it is replaced by text of the previ-
  
positive.code:   (cmd-edit-or-read buffer arg nil)
    (unless (buffer-got-error buffer)
      (setf (buffer-modified buffer) nil)
      (format *terminal-io* "~D~%" (buffer-current-linum buffer)))
    ) ;;CMD-EDIT-FILE-UNCONDITIONALLY
  
    
  (DEFUN CMD-EDIT-FILE (BUFFER FROM TO ARG)
    (declare (ignore from to))
    (DBG (FORMAT T "CMD-EDIT-FILE: ~%"))
    ;; e file  Edits  file,  and  sets the default filename.  If file is
    ;;         not specified, then the  default filename is  used.   Any
    ;;         lines  in  the  buffer are deleted before the new file is
  
negative.code:          (setf (buffer-modified ,buffer) nil)
           (buffer-set-error ,buffer "Warning: file modified"))
         (progn
           ,@body)))
  
  
  ;; (progn (PJB-CL+INDENT with-addresses 1)(PJB-CL+INDENT unless-modified 1))
  
  (defun do-insert (buffer linum)
    (dbg (format t "DO-INSERT(~S ~S) ~%" "buffer" linum))
    (do ((place (buffer-line-cons buffer linum) (cdr place))
         (line  (read-line *terminal-io* nil ".")
                (read-line *terminal-io* nil "."))
         (curr  linum (1+ curr)))
        ((string= line ".")
         (progn
           (setf (buffer-current-linum buffer) curr)
           (buffer-offset-marks buffer linum (- curr linum))))
      (setf (cdr place) (cons line (cdr place)))))
  
  
  (defun do-paste (buffer linum new-lines)
    (dbg (format t "DO-PASTE(~S ~S [~D lines]) ~%"
                 "buffer" linum (length new-lines)))
    (let* ((insert-point (buffer-line-cons buffer linum))
           (after        (cdr insert-point)))
      (setf (buffer-current-linum buffer) (+ linum (length new-lines)))
      (setf (cdr insert-point) new-lines)
      (setf (cdr (last new-lines)) after)))
  
  
  (defun do-cut (buffer from last)
    "
  RETURN: The list of cut lines.
  "
    (dbg (format t "DO-CUT(~S ~S ~S) ~%" "buffer" from last))
    (let* ((delete-point (buffer-line-cons buffer (1- from)))
           (after-point  (buffer-line-cons buffer  last))
           (result       (cdr delete-point)))
      (setf (buffer-current-linum buffer)
            (if (null (cdr after-point)) from (1+ from)))
      (setf (cdr delete-point) (cdr after-point)
            (cdr after-point) nil)
      (buffer-offset-marks buffer from (- last from -1))
      result))
  
  
  (defun do-print-lines (buffer curr last func)
    (dbg (format t " DO-PRINT-LINES(~S ~S ~S [a function]) ~%" "buffer" curr last))
    (setf (buffer-print buffer) nil)
    (do* ((curr curr (1+ curr))
          (lines (buffer-line-cons buffer curr) (cdr lines)))
         ((> curr last)
          (setf (buffer-current-linum buffer) last))
      (funcall func curr (car lines))))
  
  
  (defun do-write (buffer path mode from last)
    (dbg (format t "DO-WRITE(~S ~S ~S ~S ~S) ~%" "buffer" path mode from last))
    (handler-case
        (with-open-file (output path :direction :output :if-exists mode
                                :if-does-not-exist :create)
  