From 9878754360b7ade4c0e651dc0fda3459b99355ea Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 26 May 2004 02:14:08 +0000 Subject: [PATCH] * riece-highlight.el: Require 'derived. (riece-highlight-setup-dialogue): Turn on font-lock if riece-highlight-enabled. (riece-highlight-setup-channel-list): Ditto. --- lisp/ChangeLog | 7 +++++++ lisp/riece-highlight.el | 11 ++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9897def..aedd188 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2004-05-26 Daiki Ueno + + * 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 * riece-addon.el (riece-command-list-addons): Sort add-ons. diff --git a/lisp/riece-highlight.el b/lisp/riece-highlight.el index e484ea6..b5afa46 100644 --- a/lisp/riece-highlight.el +++ b/lisp/riece-highlight.el @@ -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" @@ -200,14 +201,18 @@ (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 @@ -281,7 +286,7 @@ 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)) -- 1.7.10.4