From: yoichi Date: Wed, 4 Sep 2002 10:16:23 +0000 (+0000) Subject: * wl-vars.el (wl-message-mode-line-format): New variable. X-Git-Tag: elmo-mark-root~15 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=340e5fb110a4b5da62043da1fe5709956dc74421;p=elisp%2Fwanderlust.git * wl-vars.el (wl-message-mode-line-format): New variable. (wl-message-mode-line-format-spec-alist): Ditto. * wl-message.el (wl-message-buffer-mode-line-formatter): Ditto. (wl-message-redisplay): Use wl-message-mode-line-format. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index b21bbc8..6a8e4e7 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2002-09-04 Yoichi NAKAYAMA + + * wl-vars.el (wl-message-mode-line-format): New variable. + (wl-message-mode-line-format-spec-alist): Ditto. + * wl-message.el (wl-message-buffer-mode-line-formatter): Ditto. + (wl-message-redisplay): Use wl-message-mode-line-format. + 2002-09-04 Yuuichi Teranishi * wl-mime.el (wl-draft-preview-message): Bind wl-draft-parent-folder. diff --git a/wl/wl-message.el b/wl/wl-message.el index 96edf90..2e238a8 100644 --- a/wl/wl-message.el +++ b/wl/wl-message.el @@ -61,6 +61,7 @@ (defvar wl-message-buffer-cur-summary-buffer nil) (defvar wl-message-buffer-original-buffer nil) ; original buffer. (defvar wl-message-buffer-all-header-flag nil) +(defvar wl-message-buffer-mode-line-formatter nil) (make-variable-buffer-local 'wl-message-buffer-cur-folder) (make-variable-buffer-local 'wl-message-buffer-cur-number) @@ -68,6 +69,7 @@ (make-variable-buffer-local 'wl-message-buffer-cur-summary-buffer) (make-variable-buffer-local 'wl-message-buffer-original-buffer) (make-variable-buffer-local 'wl-message-buffer-all-header-flag) +(make-variable-buffer-local 'wl-message-buffer-mode-line-formatter) (defvar wl-fixed-window-configuration nil) @@ -432,12 +434,12 @@ Returns non-nil if bottom of message." (setq wl-message-buffer-cur-summary-buffer summary-buf) (setq wl-message-buffer-cur-folder (elmo-folder-name-internal folder)) (setq wl-message-buffer-cur-number number) + (wl-line-formatter-setup + wl-message-buffer-mode-line-formatter + wl-message-mode-line-format + wl-message-mode-line-format-spec-alist) (setq mode-line-buffer-identification - (format "Wanderlust: << %s / %s >>" - (if (memq 'modeline wl-use-folder-petname) - (wl-folder-get-petname (elmo-folder-name-internal - folder)) - (elmo-folder-name-internal folder)) number)) + (funcall wl-message-buffer-mode-line-formatter)) ;; highlight body ; (when wl-highlight-body-too ; (wl-highlight-body)) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 0231fe9..1886291 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1396,6 +1396,27 @@ which appear just before @." :type 'boolean :group 'wl-pref) +(defvar wl-message-mode-line-format-spec-alist + '((?f (if (memq 'modeline wl-use-folder-petname) + (wl-folder-get-petname wl-message-buffer-cur-folder) + wl-message-buffer-cur-folder)) + (?n wl-message-buffer-cur-number)) + "An alist of format specifications for message buffer's mode-lines. +Each element is a list of following: +\(SPEC STRING-EXP\) +SPEC is a character for format specification. +STRING-EXP is an expression to get string to insert.") + +(defcustom wl-message-mode-line-format "Wanderlust: << %f / %n >>" + "*A format string for message buffer's mode-line of Wanderlust. +It may include any of the following format specifications +which are replaced by the given information: + +%f The folder name. +%n The number of the message." + :group 'wl-pref + :type 'string) + (defcustom wl-message-truncate-lines default-truncate-lines "*Truncate lines in Message Buffer." :type 'boolean