anchor.diff:  (in-package :lem)
   
  -(export '(*pre-command-hook*
  +(export '(*this-command*
  +          *pre-command-hook*
             *post-command-hook*
             *exit-editor-hook*
             interactive-p
  
positive.code:     (push (cons flag t) *last-flags*)
      (push (cons flag t) *curr-flags*)))
  
  (defun call-command (command-name arg)
    (run-hooks *pre-command-hook* command-name)
    (prog1 (let ((cmd (get-command command-name)))
             (if cmd
                 (funcall cmd arg)
                 (editor-error "~A: command not found" command-name)))
      (buffer-undo-boundary)
      (run-hooks *post-command-hook* command-name)))
  
  (defmacro do-command-loop ((&key interactive) &body body)
    (alexandria:once-only (interactive)
  
negative.code:           pop-up-backtrace
            call-background-job))
  
  (defvar *this-command* nil)
  (defvar *pre-command-hook* '())
  (defvar *post-command-hook* '())
  (defvar *exit-editor-hook* '())
  