+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
'(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)))))
(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))
: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)