From e90b2c85cd8df519bad27ece0021da1afed8648a Mon Sep 17 00:00:00 2001 From: yoichi Date: Thu, 20 May 2004 03:53:08 +0000 Subject: [PATCH] * wl-vars.el (wl-use-flag-folder-help-echo): Avolished. (wl-highlight-summary-line-help-echo-alist): New variable. * wl-highlight.el (wl-highlight-summary-line-flag-folder): Divide into `wl-highlight-summary-line-help-echo' and `wl-highlight-flag-folder-help-echo'. (wl-highlight-summary-line-string): Change accordingly. (wl-highlight-summary-current-line): Ditto. --- wl/ChangeLog | 10 ++++++++++ wl/wl-highlight.el | 46 +++++++++++++++++++++++----------------------- wl/wl-vars.el | 8 ++++++-- 3 files changed, 39 insertions(+), 25 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index fec674f..aa28b75 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,13 @@ +2004-05-20 Yoichi NAKAYAMA + + * wl-vars.el (wl-use-flag-folder-help-echo): Avolished. + (wl-highlight-summary-line-help-echo-alist): New variable. + * wl-highlight.el (wl-highlight-summary-line-flag-folder): Divide + into `wl-highlight-summary-line-help-echo' and + `wl-highlight-flag-folder-help-echo'. + (wl-highlight-summary-line-string): Change accordingly. + (wl-highlight-summary-current-line): Ditto. + 2004-05-18 Yoichi NAKAYAMA * wl-highlight.el (wl-highlight-message): Ignore white spaces diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index fb28b67..5d37f53 100644 --- a/wl/wl-highlight.el +++ b/wl/wl-highlight.el @@ -861,24 +861,26 @@ '(wl-highlight-summary-normal-face) '(wl-highlight-summary-thread-top-face))))))) -(defun wl-highlight-summary-line-flag-folder (number beg end &optional string) - ;; help-echo for flag folder. - (let (flag-info) - (current-buffer) - (when (eq (elmo-folder-type-internal wl-summary-buffer-elmo-folder) - 'flag) - (setq flag-info - (elmo-flag-folder-referrer wl-summary-buffer-elmo-folder - number)) - (if flag-info +(autoload 'elmo-flag-folder-referrer "elmo-flag") +(defun wl-highlight-flag-folder-help-echo (folder number) + (let ((referer (elmo-flag-folder-referrer folder number))) + (concat "The message exists in " + (mapconcat + (lambda (pair) + (concat (car pair) "/" + (number-to-string + (cdr pair)))) + referer ",")))) + +(defun wl-highlight-summary-line-help-echo (number beg end &optional string) + (let ((type (elmo-folder-type-internal wl-summary-buffer-elmo-folder)) + message handler) + (when (setq handler (cadr (assq type wl-highlight-summary-line-help-echo-alist))) + (setq message + (funcall handler wl-summary-buffer-elmo-folder number)) + (if message (put-text-property beg end 'help-echo - (concat "The message exists in " - (mapconcat - (lambda (pair) - (concat (car pair) "/" - (number-to-string - (cdr pair)))) - flag-info ",")) + message string))))) (defun wl-highlight-summary-line-string (number line flags temp-mark indent) @@ -889,8 +891,8 @@ (put-text-property 0 (length line) 'face fsymbol line)) (when wl-use-highlight-mouse-line (put-text-property 0 (length line) 'mouse-face 'highlight line)) - (when wl-use-flag-folder-help-echo - (wl-highlight-summary-line-flag-folder number 0 (length line) line))) + (when wl-highlight-summary-line-help-echo-alist + (wl-highlight-summary-line-help-echo number 0 (length line) line))) (defun wl-highlight-summary-current-line (&optional number flags) (interactive) @@ -924,8 +926,8 @@ 'wl-highlight-action-argument-face)) (when wl-use-highlight-mouse-line (put-text-property bol eol 'mouse-face 'highlight)) - (when wl-use-flag-folder-help-echo - (wl-highlight-summary-line-flag-folder number bol eol)) + (when wl-highlight-summary-line-help-echo-alist + (wl-highlight-summary-line-help-echo number bol eol)) (when wl-use-dnd (wl-dnd-set-drag-starter bol eol))))) @@ -1256,8 +1258,6 @@ interpreted as cited text.)" (put-text-property beg end 'mouse-face 'highlight))) -(autoload 'elmo-flag-folder-referrer "elmo-flag") - (require 'product) (product-provide (provide 'wl-highlight) (require 'wl-version)) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 8d19ee7..335d49b 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -2715,8 +2715,12 @@ This variable can also be a regex." :type 'boolean :group 'wl-highlight) -(defcustom wl-use-flag-folder-help-echo nil - "*Display help-echo in the flag folder if non-nil." +(defcustom wl-highlight-summary-line-help-echo-alist + '((flag wl-highlight-flag-folder-help-echo) + (nmz elmo-message-file-name)) + "*Alist to display help-echo in summary buffer. +Each element is (folder-type handler(function)). +Handler take two arguments elmo-folder and message number and return string." :type 'boolean :group 'wl-highlight) -- 1.7.10.4