From: ueno Date: Sat, 22 May 2004 02:09:05 +0000 (+0000) Subject: * riece-addon.el (riece-addon-list-mode): Call font-lock-set-defaults. X-Git-Tag: riece-1_0_0~21 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=67eebbbedbaf3fa9b113b6725b757fe9ddaf1c0c;p=elisp%2Friece.git * riece-addon.el (riece-addon-list-mode): Call font-lock-set-defaults. * riece-highlight.el (riece-highlight-setup-dialogue): Call font-lock-set-defaults. (riece-highlight-setup-channel-list): Ditto. * riece.el (riece): Enable add-ons after startup. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 450aa4b..7900914 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2004-05-22 Daiki Ueno + + * riece-addon.el (riece-addon-list-mode): Call font-lock-set-defaults. + + * riece-highlight.el (riece-highlight-setup-dialogue): Call + font-lock-set-defaults. + (riece-highlight-setup-channel-list): Ditto. + + * riece.el (riece): Enable add-ons after startup. + 2004-05-21 Daiki Ueno * riece.el (riece-dialogue-mode-map): Bind diff --git a/lisp/riece-addon.el b/lisp/riece-addon.el index ffec83a..fb3a987 100644 --- a/lisp/riece-addon.el +++ b/lisp/riece-addon.el @@ -220,8 +220,12 @@ All normal editing commands are turned off." truncate-lines t buffer-read-only t) (use-local-map riece-addon-list-mode-map) - (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(riece-addon-list-font-lock-keywords t)) + (if (featurep 'xemacs) + ;; In XEmacs, auto-initialization of font-lock is not affective + ;; when buffer-file-name is not set. + (font-lock-set-defaults) + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults '(riece-addon-list-font-lock-keywords t))) (run-hooks 'riece-addon-list-mode-hook)) (defun riece-command-list-addons () diff --git a/lisp/riece-highlight.el b/lisp/riece-highlight.el index eb23ff5..b1746ef 100644 --- a/lisp/riece-highlight.el +++ b/lisp/riece-highlight.el @@ -193,15 +193,23 @@ "Highlight IRC buffers") (defun riece-highlight-setup-dialogue () - (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(riece-dialogue-font-lock-keywords t)) + (if (featurep 'xemacs) + ;; In XEmacs, auto-initialization of font-lock is not affective + ;; when buffer-file-name is not set. + (font-lock-set-defaults) + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults '(riece-dialogue-font-lock-keywords t))) (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))) + (if (featurep 'xemacs) + ;; In XEmacs, auto-initialization of font-lock is not affective + ;; when buffer-file-name is not set. + (font-lock-set-defaults) + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults '(riece-channel-list-font-lock-keywords t)))) (defun riece-highlight-hide-prefix (start end length) (save-excursion diff --git a/lisp/riece.el b/lisp/riece.el index 648c0f5..9bf039b 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -275,7 +275,6 @@ If optional argument CONFIRM is non-nil, ask which IRC server to connect." (let ((pointer riece-addons)) (while pointer (riece-insinuate-addon (car pointer) riece-debug) - (riece-enable-addon (car pointer) riece-debug) (setq pointer (cdr pointer)))) (setq riece-addons-insinuated t)) (if (or confirm (null riece-server)) @@ -304,6 +303,10 @@ If optional argument CONFIRM is non-nil, ask which IRC server to connect." (while server-list (riece-command-open-server (car server-list)) (setq server-list (cdr server-list)))) + (let ((pointer riece-addons)) + (while pointer + (riece-enable-addon (car pointer) riece-debug) + (setq pointer (cdr pointer)))) (run-hooks 'riece-startup-hook) (message "%s" (substitute-command-keys "Type \\[describe-mode] for help"))))