anchor.diff:  ;;;
   ;;; A basic and experimental(!) Lisp editor, featuring:
   ;;;
  -;;;   - a basic code completer for Qt/EQL functions
  -;;;   - a basic tab completer for CL/EQL symbols (including Qt enums)
  +;;;   - a code completer for Qt/EQL functions
  +;;;   - a tab completer for CL/EQL symbols (including Qt enums)
  +;;;   - a tab completer for absolute pathnames
   ;;;   - paren highlighting
   ;;;   - simple auto indent, indent parapgraph
   ;;;   - simple syntax highlighter
  
positive.code:             (qfun completer "setWidget" *current-editor*)))
          (qset completer "completionPrefix" (setf prefix (subseq text start)))
          (update-tab-completer-2 file))))
    (defun update-tab-completer-2 (&optional file)
      (qfun completer "complete")
      (let ((popup (if file *file-popup* *symbol-popup*)))
        (qfun popup "resize" (list (qget *current-editor* "width")
  
negative.code:   (qset *main* "windowTitle" (file-namestring *file-name*)))
  
  (defun ini ()
    (x:do-with (qset *command*)
      ("horizontalScrollBarPolicy" |Qt.ScrollBarAlwaysOff|)
      ("verticalScrollBarPolicy" |Qt.ScrollBarAlwaysOff|))
    (x:do-with (qset *output*)
      ("readOnly" t)
      ("tabStopWidth" (* 8 (first (font-metrics-size)))))
    (x:do-with (qfun *splitter*)
      ("setStretchFactor" 0 2)
      ("setStretchFactor" 1 1))
    (x:do-with (qset *main*)
      ("size" (list 800 500))
      ("windowTitle" "Simple Lisp Editor"))
    (qfun *command* "setFixedHeight" (+ (second (font-metrics-size))
                                        (* 2 (qget *command* "frameWidth"))))
    (set-color *output* |QPalette.Base| "lavender")
    (dolist (ed (list *editor* *command*))
      (qconnect ed  "cursorPositionChanged()" 'cursor-position-changed))
    (qconnect *find*    "returnPressed()" 'find-text)
    (qconnect *replace* "returnPressed()" 'replace-text)
    (qconnect *next-button*    "clicked()" 'find-text)
    (qconnect *replace-button* "clicked()" 'replace-text)
    (qconnect (qapp) "aboutToQuit()" 'clean-up)
    (qoverride *editor*  "keyPressEvent(QKeyEvent*)" 'editor-key-pressed)
    (qoverride *command* "keyPressEvent(QKeyEvent*)" 'command-key-pressed)
    (ini-actions)
    (ini-highlighter)
    (ini-completer)
    (ini-highlight-rules)
    (dolist (w (list *editor* *output* *command* *completer* *symbol-popup*))
      (qset w "font" eql::*code-font*))
    (local-client:ini 'data-from-server)
    (show-status-message (format nil (tr "<b style='color:#4040E0'>Eval Region:</b> move to paren <b>(</b> or <b>)</b>, hit <b>~A</b>")
                                 (qfun (qget *action-eval-region* "shortcut") "toString" |QKeySequence.NativeText|))
                         :html)
    (qfun *main* "show")
    (qsingle-shot 0 'delayed-ini))
  
  (defun ini-actions ()
    (flet ((keys (str)
             (qnew "QKeySequence(QString)" str)))
      (qset *action-open*         "shortcut" (keys "Ctrl+O"))
      (qset *action-save*         "shortcut" (keys "Ctrl+S"))
      (qset *action-save-and-run* "shortcut" (keys "Ctrl+R"))
      (qset *action-eval-region*  "shortcut" (keys "Ctrl+Return"))
      (qset *action-repeat-eval*  "shortcut" (keys "Ctrl+E"))
      (qset *next-button*         "shortcut" (keys "Ctrl+F"))
      (qset *replace-button*      "shortcut" (keys "Ctrl+G"))
      (qconnect *action-open*         "triggered()" 'file-open)
      (qconnect *action-save*         "triggered()" 'file-save)
      (qconnect *action-save-as*      "triggered()" 'file-save-as)
      (qconnect *action-save-and-run* "triggered()" 'save-and-run)
      (qconnect *action-eval-region*  "triggered()" 'eval-region)
      (qconnect *action-repeat-eval*  "triggered()" 'repeat-eval)))
  
  (defun ini-highlighter ()
    (setf *eql-keyword-format*  (qnew "QTextCharFormat")
          *lisp-keyword-format* (qnew "QTextCharFormat")
          *comment-format*      (qnew "QTextCharFormat"))
    (let ((syntax-editor  (qnew "QSyntaxHighlighter(QTextDocument*)" (qfun *editor* "document")))
          (syntax-command (qnew "QSyntaxHighlighter(QTextDocument*)" (qfun *command* "document"))))
      (qoverride syntax-editor "highlightBlock(QString)"
                 (lambda (str) (highlight-block syntax-editor str)))
      (qoverride syntax-command "highlightBlock(QString)"
                 (lambda (str) (highlight-block syntax-command str)))))
  
  (defun ini-completer ()
    (setf *completer*        (qnew "QListWidget"
                                   "horizontalScrollBarPolicy" |Qt.ScrollBarAlwaysOff|
                                   "verticalScrollBarPolicy" |Qt.ScrollBarAlwaysOff|)
          *file-completer*   (qnew "QCompleter"
                                   "maxVisibleItems" 10)
          *symbol-completer* (qnew "QCompleter"
                                   "maxVisibleItems" 10)
          *file-model*       (qnew "QFileSystemModel")
          *symbol-model*     (qnew "QStringListModel")
          *file-popup*       (qfun *file-completer* "popup")
          *symbol-popup*     (qfun *symbol-completer* "popup"))
    (x:do-with (qset *completer*)
      ("frameShape" |QFrame.Box|)
      ("frameShadow" |QFrame.Plain|)
      ("lineWidth" 1))
    (set-color *symbol-popup* |QPalette.Base| "palegreen")
    (qfun *completer* "setWindowFlags" |Qt.Popup|)
    (qfun *symbol-completer* "setWidget" *command*)
    (qfun *symbol-completer* "setModel" *symbol-model*)
    (qfun *file-completer* "setWidget" *command*)
    (qfun *file-completer* "setModel" *file-model*)
    (qfun *file-model* "setRootPath" "")
    (qconnect *completer* "itemDoubleClicked(QListWidgetItem*)" 'insert-completer-option-text)
    (qconnect *file-completer* "highlighted(QString)"
              (lambda (str) (item-highlighted str :file)))
    (qconnect *file-model* "directoryLoaded(QString)"
              (lambda (arg) (update-tab-completer-2 :file)))
    (qconnect *symbol-completer* "highlighted(QString)" 'item-highlighted)
    (qoverride *completer* "keyPressEvent(QKeyEvent*)" 'completer-key-pressed)
    (qoverride *completer* "focusOutEvent(QFocusEvent*)" 'close-completer)
    (update-completer-symbols))
  
  (defun delayed-ini ()
    (let* ((buttons (list *next-button* *replace-button*))
  