anchor.diff:        (lambda (evt) (declare (ignore evt)) (unless (plaintextp txt) (on-left-click edit-ctrl))))
       (ltk:bind edit-ctrl "<Map>" (lambda (evt) (declare (ignore evt)) (ltk:focus edit-ctrl)))
       (ltk:bind edit-ctrl "<<Modified>>" (lambda (evt) (on-file-modified evt)))
  -    (add-key-binding edit-ctrl *key-cut* (lambda (evt) (declare (ignore evt)) (on-cut edit-ctrl)))
  -    (add-key-binding edit-ctrl *key-copy* (lambda (evt) (declare (ignore evt)) (on-copy edit-ctrl)))    
  -    (add-key-binding edit-ctrl *key-paste* (lambda (evt) (declare (ignore evt)) (on-paste edit-ctrl)))
  -    (add-key-binding edit-ctrl *key-select-all* (lambda (evt) (declare (ignore evt)) (on-select-all edit-ctrl)))
  -    (add-key-binding edit-ctrl *key-reformat* (lambda (evt) (declare (ignore evt)) (on-re-indent edit-ctrl)))
  -    (add-key-binding edit-ctrl *key-macro-expand* (lambda (evt) (declare (ignore evt)) (on-macro-expand edit-ctrl)))
  -    (add-key-binding edit-ctrl *key-copy-to-repl* (lambda (evt) (declare (ignore evt)) (on-copy-sexp-to-repl edit-ctrl)))
  -    (add-key-binding edit-ctrl *key-code-complete* (lambda (evt) (on-code-complete edit-ctrl evt)))
  -    (add-key-binding edit-ctrl *key-lookup*
  -      (lambda (evt) (declare (ignore evt)) (unless (plaintextp txt) (on-lookup-definition edit-ctrl))))
  +    (dolist (binding *text-keys*)
  +      ;;(format t "~%binding ~A to ~A" (first binding) (second binding))
  +      (add-key-binding edit-ctrl (first binding)
  +                       (lambda (evt)
  +                         (declare (ignore evt))
  +                         ;;(format t "~%calling ~A" (second binding))
  +                         (funcall (second binding) edit-ctrl))))
       (ltk:bind edit-ctrl "<Return>"
         (lambda (evt) (unless (plaintextp txt) (on-return-key edit-ctrl evt))))
       (ltk:bind edit-ctrl "<space>"
  
positive.code:                                (let* ((buffer (selected-buffer *buffer-manager*))
                                        (text (ltk:textbox buffer)))
                                   (unless (plaintextp buffer)
                                     (on-code-complete text nil)))))
          (text-action "CLHS lookup" on-lookup-definition)
          (separator)
          (action "(Re)load buffer" on-reload-file)
  
negative.code:       (when (string= path-name (file-path buffer))
          (return count)))))
  
  (eval-when (:compile-toplevel :load-toplevel :execute)
    (defparameter *text-keys*
      (list ;; format: (key action &optional suppress-in-repl)
       (list *key-cut* 'on-cut t)
       (list *key-copy* 'on-copy)
       (list *key-paste* 'on-paste)
       (list *key-select-all* 'on-select-all t)
       (list *key-reformat* 'on-re-indent t)
       (list *key-macro-expand* 'on-macro-expand t)
       (list *key-copy-to-repl* 'on-copy-sexp-to-repl t)
       ;; code-complete was suppressed, even though an implementation existed...
       (list *key-code-complete* 'on-code-complete)
       ;; lookup should be suppressed unless (plaintextp txt)
       (list *key-lookup* 'on-lookup-definition))))
  
  (defmethod initialize-instance :after ((txt buffer) &key)
    (setf (edit-ctrl txt) (ltk:textbox txt))
    (ltk:grid-forget (ltk::hscroll txt))  ; remove the horizontal scroll-bar
  