* wl-vars.el (wl-use-flag-folder-help-echo): Avolished.
authoryoichi <yoichi>
Thu, 20 May 2004 03:53:08 +0000 (03:53 +0000)
committeryoichi <yoichi>
Thu, 20 May 2004 03:53:08 +0000 (03:53 +0000)
(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
wl/wl-highlight.el
wl/wl-vars.el

index fec674f..aa28b75 100644 (file)
@@ -1,3 +1,13 @@
+2004-05-20  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * 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  <yoichi@geiin.org>
 
        * wl-highlight.el (wl-highlight-message): Ignore white spaces
index fb28b67..5d37f53 100644 (file)
              '(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)
     (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)
                           '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))
 
index 8d19ee7..335d49b 100644 (file)
@@ -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)