Fixed the last change.
[riece] / lisp / riece-highlight.el
index b601d22..e484ea6 100644 (file)
 (defconst riece-highlight-description
   "Highlight IRC buffers")
 
-(defvar font-lock-support-mode)
 (defun riece-highlight-setup-dialogue ()
   (make-local-variable 'font-lock-defaults)
   (setq font-lock-defaults '(riece-dialogue-font-lock-keywords t))
-  (make-local-variable 'font-lock-verbose)
-  (setq font-lock-verbose nil)
-  (when (boundp 'font-lock-support-mode)
-    (make-local-variable 'font-lock-support-mode)
-    (setq font-lock-support-mode nil))
-  (make-local-hook 'font-lock-mode-hook)
-  (setq font-lock-mode-hook nil)
+  ;; In XEmacs, auto-initialization of font-lock is not affective
+  ;; when buffer-file-name is not set.
+  (font-lock-set-defaults)
   (make-local-hook 'after-change-functions)
   (add-hook 'after-change-functions
            'riece-highlight-hide-prefix nil 'local))
 (defun riece-highlight-setup-channel-list ()
   (make-local-variable 'font-lock-defaults)
   (setq font-lock-defaults '(riece-channel-list-font-lock-keywords t))
-  (make-local-variable 'font-lock-verbose)
-  (setq font-lock-verbose nil)
-  (when (boundp 'font-lock-support-mode)
-    (make-local-variable 'font-lock-support-mode)
-    (setq font-lock-support-mode nil))
-  (make-local-hook 'font-lock-mode-hook)
-  (setq font-lock-mode-hook nil))
+  ;; In XEmacs, auto-initialization of font-lock is not affective
+  ;; when buffer-file-name is not set.
+  (font-lock-set-defaults))
 
 (defun riece-highlight-hide-prefix (start end length)
   (save-excursion