[slime-devel] Reader conditional highlighting for xemacs

Raymond Toy raymond.toy at ericsson.com
Thu Nov 11 17:25:12 UTC 2004


Here is a very gross implementation of reader conditional highlighting for 
xemacs.  This is a really cool feature, but it should use something besides
font-lock-comment-face, I think.  It would also be nice if the conditional
expression were also highlighed the same way.  Then I could ignore it 
completely.

Ray

(defun slime-activate-font-lock-magic ()
  (if (featurep 'xemacs)
      (let ((pattern '((slime-search-suppressed-forms 
                        (0 font-lock-comment-face t)))))
        (setf lisp-font-lock-keywords
              (append lisp-font-lock-keywords pattern))
        (setf lisp-font-lock-keywords-1
            (append lisp-font-lock-keywords pattern))
        (setf lisp-font-lock-keywords-2
            (append lisp-font-lock-keywords pattern)))
    (font-lock-add-keywords
     'lisp-mode
     '((slime-search-suppressed-forms 0 font-lock-comment-face t)))))

(when slime-highlight-suppressed-forms
  (slime-activate-font-lock-magic))







More information about the slime-devel mailing list