From: ueno Date: Fri, 30 May 2003 02:07:41 +0000 (+0000) Subject: * riece-highlight.el: Make it an add-on. X-Git-Tag: riece-0_0_2~8 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c646ac464d1ccdf2696ffa9972cdb584cc442b6c;p=elisp%2Friece.git * riece-highlight.el: Make it an add-on. (riece-highlight-insinuate): New function. * riece.el: Don't require 'riece-highlight. * riece-options.el (riece-addons): Turn on riece-highlight and riece-ctcp by default. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ee62fc8..9396a18 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2003-05-30 Daiki Ueno + * riece-highlight.el: Make it an add-on. + (riece-highlight-insinuate): New function. + * riece.el: Don't require 'riece-highlight. + * riece-options.el (riece-addons): Turn on riece-highlight and + riece-ctcp by default. + * riece-display.el (riece-configure-windows-predicate): New function. (riece-configure-windows-predicate): New user option. (riece-redisplay-buffers): Use it. diff --git a/lisp/riece-highlight.el b/lisp/riece-highlight.el index 9575ca8..466e3cb 100644 --- a/lisp/riece-highlight.el +++ b/lisp/riece-highlight.el @@ -184,13 +184,6 @@ :type '(repeat (list string)) :group 'riece-highlight) -(put 'riece-channel-mode 'font-lock-defaults - '(riece-highlight-font-lock-keywords t)) -(put 'riece-others-mode 'font-lock-defaults - '(riece-highlight-font-lock-keywords t)) -(put 'riece-dialogue-mode 'font-lock-defaults - '(riece-highlight-font-lock-keywords t)) - (defun riece-highlight-schedule-turn-on-font-lock () (add-hook 'riece-channel-mode-hook 'riece-highlight-turn-on-font-lock) @@ -199,9 +192,6 @@ (add-hook 'riece-dialogue-mode-hook 'riece-highlight-turn-on-font-lock)) -(add-hook 'riece-after-load-startup-hook - 'riece-highlight-schedule-turn-on-font-lock) - (defvar font-lock-support-mode) (defun riece-highlight-turn-on-font-lock () (make-local-variable 'font-lock-defaults) @@ -224,6 +214,16 @@ (if (looking-at riece-prefix-regexp) (put-text-property (match-beginning 1) (match-end 1) 'invisible t)))) +(defun riece-highlight-insinuate () + (put 'riece-channel-mode 'font-lock-defaults + '(riece-highlight-font-lock-keywords t)) + (put 'riece-others-mode 'font-lock-defaults + '(riece-highlight-font-lock-keywords t)) + (put 'riece-dialogue-mode 'font-lock-defaults + '(riece-highlight-font-lock-keywords t)) + (add-hook 'riece-after-load-startup-hook + 'riece-highlight-schedule-turn-on-font-lock)) + (provide 'riece-highlight) ;;; riece-highlight.el ends here diff --git a/lisp/riece-options.el b/lisp/riece-options.el index e4263fa..cafcc4d 100644 --- a/lisp/riece-options.el +++ b/lisp/riece-options.el @@ -105,7 +105,7 @@ way is to put Riece variables on .emacs or file loaded from there." :type '(repeat (file :tag "Initialization File")) :group 'riece-options) -(defcustom riece-addons nil +(defcustom riece-addons '(riece-highlight riece-ctcp) "Add-ons insinuated into Riece." :type '(repeat symbol) :group 'riece-options) diff --git a/lisp/riece.el b/lisp/riece.el index 75888f0..5236676 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -31,7 +31,6 @@ (require 'riece-emacs)) (require 'riece-filter) -(require 'riece-highlight) (require 'riece-display) (require 'riece-server) (require 'riece-compat)