* riece-highlight.el: Require 'derived.
authorueno <ueno>
Wed, 26 May 2004 02:14:08 +0000 (02:14 +0000)
committerueno <ueno>
Wed, 26 May 2004 02:14:08 +0000 (02:14 +0000)
(riece-highlight-setup-dialogue): Turn on font-lock if
riece-highlight-enabled.
(riece-highlight-setup-channel-list): Ditto.

lisp/ChangeLog
lisp/riece-highlight.el

index 9897def..aedd188 100644 (file)
@@ -1,3 +1,10 @@
+2004-05-26  Daiki Ueno  <ueno@unixuser.org>
+
+       * riece-highlight.el: Require 'derived.
+       (riece-highlight-setup-dialogue): Turn on font-lock if
+       riece-highlight-enabled.
+       (riece-highlight-setup-channel-list): Ditto.
+
 2004-05-24  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-addon.el (riece-command-list-addons): Sort add-ons.
index e484ea6..b5afa46 100644 (file)
@@ -28,6 +28,7 @@
 (require 'riece-options)               ;riece-channel-list-buffer-mode
 (require 'riece-identity)              ;riece-format-identity
 (require 'font-lock)
+(require 'derived)
 
 (defgroup riece-highlight nil
   "Highlight IRC buffers"
   (font-lock-set-defaults)
   (make-local-hook 'after-change-functions)
   (add-hook 'after-change-functions
-           'riece-highlight-hide-prefix nil 'local))
+           'riece-highlight-hide-prefix nil 'local)
+  (if riece-highlight-enabled
+      (font-lock-mode 1)))
 
 (defun riece-highlight-setup-channel-list ()
   (make-local-variable 'font-lock-defaults)
   (setq font-lock-defaults '(riece-channel-list-font-lock-keywords t))
   ;; In XEmacs, auto-initialization of font-lock is not affective
   ;; when buffer-file-name is not set.
-  (font-lock-set-defaults))
+  (font-lock-set-defaults)
+  (if riece-highlight-enabled
+      (font-lock-mode 1)))
 
 (defun riece-highlight-hide-prefix (start end length)
   (save-excursion
                 major-mode))
                '(riece-dialogue-mode riece-channel-list-mode))
          (with-current-buffer (car buffers)
-           (font-lock-mode -1)))
+           (font-lock-mode 0)))
       (setq buffers (cdr buffers))))
   (setq riece-highlight-enabled nil))