anchor.diff:  (defun trans-state (name)
     (let ((state (get name 'state)))
       (assert (vi-state-p state))
  -    (setf (mode-keymap 'vi-mode) (vi-state-keymap state))
  +    (setf *current-state* state)
       (funcall (vi-state-function state))))
   
   (define-vi-state command (:keymap *command-keymap*)
  -  (setf (buffer-read-only-p (current-buffer)) t))
  +  (setf (buffer-read-only-p (current-buffer)) t)
  +  (setf (element-name *modeline-element*) "[NORMAL]"))
   
   (define-vi-state insert (:keymap *insert-keymap*)
  -  (setf (buffer-read-only-p (current-buffer)) nil))
  +  (setf (buffer-read-only-p (current-buffer)) nil)
  +  (setf (element-name *modeline-element*) "[INSERT]"))
   
  -(define-minor-mode vi-mode
  -    (:name "vi")
  +(defun on-hook ()
  +  (setf *modeline-element* (make-vi-modeline-element))
  +  (modeline-add-status-list *modeline-element*)
     (trans-state 'command))
  +
  +(defun off-hook ()
  +  (modeline-remove-status-list *modeline-element*))
  +
  +(define-global-mode vi-mode emacs-mode
  +  (:keymap *vi-keymap*
  +   :on-hook #'on-hook
  +   :off-hook #'off-hook))
   
   (define-key *command-keymap* "0" 'vi-move-to-beginning-of-line/universal-argument-0)
   (define-key *command-keymap* "1" 'universal-argument-1)
  
positive.code: (define-key *command-keymap* "7" 'universal-argument-7)
  (define-key *command-keymap* "8" 'universal-argument-8)
  (define-key *command-keymap* "9" 'universal-argument-9)
  (define-key *command-keymap* "h" 'vi-backward-char)
  (define-key *command-keymap* "l" 'vi-forward-char)
  (define-key *command-keymap* "k" 'vi-previous-line)
  (define-key *command-keymap* "j" 'vi-next-line)
  (define-key *command-keymap* "w" 'vi-forward-word-begin)
  (define-key *command-keymap* "b" 'vi-backward-word-begin)
  (define-key *command-keymap* "W" 'vi-forward-word-begin-broad)
  
negative.code: 
  (define-key *insert-keymap* "escape" 'vi-insert-end)
  
  (define-command vi-command-dispatcher (arg) ("P")
    (let* ((key-seq (last-read-key-sequence))
           (command (lem::keymap-find-keybind (vi-state-keymap *current-state*) key-seq)))
      (if command
          (call-command command arg)
          (let ((command (lem::keymap-find-keybind *global-keymap* key-seq)))
            (call-command command arg)))))
  
  (define-command vi-move-to-beginning-of-line/universal-argument-0 () ()
    (if (mode-active-p (current-buffer) 'universal-argument)
        (universal-argument-0)
        (move-to-beginning-of-line)))
  
  (define-command vi-forward-char (&optional (n 1)) ("p")
    (forward-char n))
  
  (define-command vi-backward-char (&optional (n 1)) ("p")
    (backward-char n))
  
  (define-command vi-next-line (&optional (n 1)) ("p")
    (next-line n))
  
  (define-command vi-previous-line (&optional (n 1)) ("p")
    (previous-line n))
  
  (define-command vi-forward-word-begin (&optional (n 1)) ("p")
    (forward-word-begin (current-point) n nil))
  