From 24341b808036dc970d206589e67d8168b2b94cb5 Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 27 Aug 2003 23:20:33 +0000 Subject: [PATCH] * riece-history.el (riece-history-insinuate): Don't set riece-guess-channel-try-functions here. (riece-history-requires): Don't require riece-guess. * riece-unread.el (riece-unread-requires): Don't require riece-guess. (riece-unread-insinuate): Don't set riece-guess-channel-try-functions here. --- lisp/ChangeLog | 11 +++++++++++ lisp/riece-guess.el | 6 +----- lisp/riece-history.el | 20 ++++++++++++-------- lisp/riece-unread.el | 25 ++++++++++++------------- 4 files changed, 36 insertions(+), 26 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e186cf0..e3fc371 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,16 @@ 2003-08-27 Daiki Ueno + * riece-history.el (riece-history-insinuate): Don't set + riece-guess-channel-try-functions here. + (riece-history-requires): Don't require riece-guess. + + * riece-unread.el (riece-unread-requires): Don't require + riece-guess. + (riece-unread-insinuate): Don't set + riece-guess-channel-try-functions here. + +2003-08-27 Daiki Ueno + * riece-unread.el (riece-unread-after-display-message-function): Rename from riece-unread-display-message-function. (riece-unread-after-switch-to-channel-function): Rename from diff --git a/lisp/riece-guess.el b/lisp/riece-guess.el index 5c01215..3112ce9 100644 --- a/lisp/riece-guess.el +++ b/lisp/riece-guess.el @@ -21,11 +21,6 @@ ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. -;;; Commentary: - -;; To use, add the following line to your ~/.riece/init.el: -;; (add-to-list 'riece-addons 'riece-guess) - ;;; Code: (require 'riece-identity) @@ -48,6 +43,7 @@ (delq nil (copy-sequence riece-current-channels))) (defun riece-guess-candidates () + "Call \\[riece-guess-channel-try-functions] in turn and merge the results." (let ((functions riece-guess-channel-try-functions) candidates) (while functions diff --git a/lisp/riece-history.el b/lisp/riece-history.el index 435c9fa..65da960 100644 --- a/lisp/riece-history.el +++ b/lisp/riece-history.el @@ -23,8 +23,11 @@ ;;; Commentary: -;; To use, add the following line to your ~/.riece/init.el: -;; (add-to-list 'riece-addons 'riece-history) +;; You can check recently visited channels via `C-c g' in the commands +;; buffer, by adding the following lines to ~/.riece/init.el: + +;; (add-hook 'riece-guess-channel-try-functions +;; 'riece-guess-channel-from-history) ;;; Code: @@ -52,9 +55,9 @@ index (1+ index))) (nreverse result))) -(defun riece-history-requires () - (if (memq 'riece-guess riece-addons) - '(riece-guess))) +;;; (defun riece-history-requires () +;;; (if (memq 'riece-guess riece-addons) +;;; '(riece-guess))) (defun riece-history-insinuate () (add-hook 'riece-startup-hook @@ -67,9 +70,10 @@ (add-hook 'riece-after-switch-to-channel-functions (lambda (last) (ring-insert riece-channel-history last))) - (if (memq 'riece-guess riece-addons) - (add-hook 'riece-guess-channel-try-functions - 'riece-guess-channel-from-history))) +;;; (if (memq 'riece-guess riece-addons) +;;; (add-hook 'riece-guess-channel-try-functions +;;; 'riece-guess-channel-from-history)) + ) (provide 'riece-history) diff --git a/lisp/riece-unread.el b/lisp/riece-unread.el index eb4a16e..64bb382 100644 --- a/lisp/riece-unread.el +++ b/lisp/riece-unread.el @@ -23,11 +23,13 @@ ;;; Commentary: -;; This add-on displays unread mark ("!") for channels which have -;; "unread messages". +;; This add-on marks channels where new messages are arrived. -;; To use, add the following line to your ~/.riece/init.el: -;; (add-to-list 'riece-addons 'riece-unread) +;; You can check the unread channels via `C-c g' in the commands +;; buffer, by adding the following lines to ~/.riece/init.el: + +;; (add-hook 'riece-guess-channel-try-functions +;; 'riece-guess-channel-from-unread) ;;; Code: @@ -112,12 +114,8 @@ (let (requires) (if (memq 'riece-highlight riece-addons) (setq requires (cons 'riece-highlight requires))) - (if (memq 'riece-guess riece-addons) - (setq requires (cons 'riece-guess requires))) - ;; riece-guess-channel-from-unread should be prior to - ;; riece-guess-channel-from-history. - (if (memq 'riece-history riece-addons) - (setq requires (cons 'riece-history requires))) +;;; (if (memq 'riece-guess riece-addons) +;;; (setq requires (cons 'riece-guess requires))) requires)) (defun riece-unread-insinuate () @@ -137,9 +135,10 @@ (setq riece-channel-list-mark-face-alist (cons '(?! . riece-channel-list-unread-face) riece-channel-list-mark-face-alist))) - (if (memq 'riece-guess riece-addons) - (add-hook 'riece-guess-channel-try-functions - 'riece-guess-channel-from-unread))) +;;; (if (memq 'riece-guess riece-addons) +;;; (add-hook 'riece-guess-channel-try-functions +;;; 'riece-guess-channel-from-unread)) + ) (provide 'riece-unread) -- 1.7.10.4