+2002-09-04 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <teranisi@gohome.org>
* wl-mime.el (wl-draft-preview-message): Bind wl-draft-parent-folder.
(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)
(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)
(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))
: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