From: yamaoka Date: Wed, 20 Sep 2000 13:12:30 +0000 (+0000) Subject: * wl.el (wl-plugged-mode): Use revised `wl-mode-line-buffer-identification'. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdbc7dfea2ac87f52fd00abd6c2a9fa22c36103d;p=elisp%2Fwanderlust.git * wl.el (wl-plugged-mode): Use revised `wl-mode-line-buffer-identification'. (wl-plugged-init): Don't use `force-mode-line-update'. * wl-xmas.el (wl-draft-overload-functions): Use revised `wl-mode-line-buffer-identification'. (wl-setup-summary): Renamed from `wl-xmas-setup-summary'. (wl-setup-folder): Renamed from `wl-xmas-setup-folder'. (TopLevel): Add `wl-setup-summary' to `wl-summary-mode-hook'; add `wl-plugged-init-icons' and `wl-biff-init-icons' to `wl-make-plugged-hook'; add `wl-folder-init-icons' and `wl-setup-folder' to `wl-folder-mode-hook'. * wl-vars.el (wl-use-highlight-mouse-line): Activate it for Emacs 19 as well. (wl-mode-line-display-priority-list): New user option. (wl-biff-state-indicator-off, wl-biff-state-indicator-on): Defcustomized. (wl-make-plugged-hook, wl-summary-mode-hook, wl-folder-mode-hook): Add docs. * wl-util.el (wl-biff-start): Call `wl-biff-check-folders' at the start. (wl-mode-line-buffer-identification): Revised as a function. * wl-summary.el (wl-summary-mode): Use revised `wl-mode-line-buffer-identification'; don't call `wl-e21-setup-summary' nor `wl-xmas-setup-summary' directly. (TopLevel): Don't bind `wl-e21-setup-summary' nor `wl-xmas-setup-summary'. * wl-nemacs.el (wl-draft-overload-functions): Use revised `wl-mode-line-buffer-identification'. * wl-mule.el (wl-draft-overload-functions): Use revised `wl-mode-line-buffer-identification'. * wl-folder.el (wl-make-plugged-alist): Don't call `wl-biff-init-icons' nor `wl-plugged-init-icons' directly. (wl-folder): Don't call `wl-folder-init-icons' directly. (wl-folder-mode): Don't call `wl-e21-setup-folder' nor `wl-xmas-setup-folder' directly; use revised `wl-mode-line-buffer-identification'. (TopLevel): Don't bind `wl-biff-init-icons', `wl-plugged-init-icons', `wl-folder-init-icons', `wl-e21-setup-folder' nor `wl-xmas-setup-folder'. * wl-e21.el (wl-draft-overload-functions): Use revised `wl-mode-line-buffer-identification'. (wl-setup-summary): Renamed from `wl-e21-setup-summary'. (wl-setup-folder): Renamed from `wl-e21-setup-folder'. (TopLevel): Add `wl-setup-summary' to `wl-summary-mode-hook'; add `wl-plugged-init-icons' and `wl-biff-init-icons' to `wl-make-plugged-hook'; add `wl-folder-init-icons' and `wl-setup-folder' to `wl-folder-mode-hook'. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index bc4ea63..fb527a7 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,10 +1,70 @@ +2000-09-20 Katsumi Yamaoka + + * wl.el (wl-plugged-mode): Use revised + `wl-mode-line-buffer-identification'. + (wl-plugged-init): Don't use `force-mode-line-update'. + + * wl-xmas.el (wl-draft-overload-functions): Use revised + `wl-mode-line-buffer-identification'. + (wl-setup-summary): Renamed from `wl-xmas-setup-summary'. + (wl-setup-folder): Renamed from `wl-xmas-setup-folder'. + (TopLevel): Add `wl-setup-summary' to `wl-summary-mode-hook'; + add `wl-plugged-init-icons' and `wl-biff-init-icons' to + `wl-make-plugged-hook'; + add `wl-folder-init-icons' and `wl-setup-folder' to + `wl-folder-mode-hook'. + + * wl-vars.el (wl-use-highlight-mouse-line): Activate it for Emacs + 19 as well. + (wl-mode-line-display-priority-list): New user option. + (wl-biff-state-indicator-off, wl-biff-state-indicator-on): + Defcustomized. + (wl-make-plugged-hook, wl-summary-mode-hook, wl-folder-mode-hook): + Add docs. + + * wl-util.el (wl-biff-start): Call `wl-biff-check-folders' at the + start. + (wl-mode-line-buffer-identification): Revised as a function. + + * wl-summary.el (wl-summary-mode): Use revised + `wl-mode-line-buffer-identification'; don't call + `wl-e21-setup-summary' nor `wl-xmas-setup-summary' directly. + (TopLevel): Don't bind `wl-e21-setup-summary' nor + `wl-xmas-setup-summary'. + + * wl-nemacs.el (wl-draft-overload-functions): Use revised + `wl-mode-line-buffer-identification'. + + * wl-mule.el (wl-draft-overload-functions): Use revised + `wl-mode-line-buffer-identification'. + + * wl-folder.el (wl-make-plugged-alist): Don't call + `wl-biff-init-icons' nor `wl-plugged-init-icons' directly. + (wl-folder): Don't call `wl-folder-init-icons' directly. + (wl-folder-mode): Don't call `wl-e21-setup-folder' nor + `wl-xmas-setup-folder' directly; + use revised `wl-mode-line-buffer-identification'. + (TopLevel): Don't bind `wl-biff-init-icons', + `wl-plugged-init-icons', `wl-folder-init-icons', + `wl-e21-setup-folder' nor `wl-xmas-setup-folder'. + + * wl-e21.el (wl-draft-overload-functions): Use revised + `wl-mode-line-buffer-identification'. + (wl-setup-summary): Renamed from `wl-e21-setup-summary'. + (wl-setup-folder): Renamed from `wl-e21-setup-folder'. + (TopLevel): Add `wl-setup-summary' to `wl-summary-mode-hook'; + add `wl-plugged-init-icons' and `wl-biff-init-icons' to + `wl-make-plugged-hook'; + add `wl-folder-init-icons' and `wl-setup-folder' to + `wl-folder-mode-hook'. + 2000-09-18 A. SAGATA Katsumi Yamaoka * wl.el (wl): Call `wl-biff-start'. (wl-exit): Call `wl-biff-stop'. (wl-plugged-mode): Show biff in modeline. - (wl-unplugged-glyph, wl-unplugged-glyph): Removed. + (wl-unplugged-glyph, wl-plugged-glyph): Removed. * wl-xmas.el (wl-draft-overload-functions): Show biff in modeline. (wl-biff-init-icons): New function. diff --git a/wl/wl-e21.el b/wl/wl-e21.el index ed0945f..087919b 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -38,6 +38,14 @@ (defvar-maybe wl-folder-mode-map (make-sparse-keymap)) (defvar-maybe wl-draft-mode-map (make-sparse-keymap))) +(add-hook 'wl-folder-mode-hook 'wl-setup-folder) +(add-hook 'wl-folder-mode-hook 'wl-folder-init-icons) + +(add-hook 'wl-make-plugged-hook 'wl-biff-init-icons) +(add-hook 'wl-make-plugged-hook 'wl-plugged-init-icons) + +(add-hook 'wl-summary-mode-hook 'wl-setup-summary) + (defvar wl-use-toolbar (and (display-graphic-p) (image-type-available-p 'xpm))) (defvar wl-plugged-image nil) @@ -482,9 +490,9 @@ (defun wl-make-date-string () (format-time-string "%a, %d %b %Y %T %z")) -(defalias 'wl-e21-setup-folder 'wl-e21-setup-folder-toolbar) +(defalias 'wl-setup-folder 'wl-e21-setup-folder-toolbar) -(defalias 'wl-e21-setup-summary 'wl-e21-setup-summary-toolbar) +(defalias 'wl-setup-summary 'wl-e21-setup-summary-toolbar) (defun wl-message-overload-functions () (wl-e21-setup-message-toolbar) @@ -571,15 +579,7 @@ Special commands: (define-key wl-draft-mode-map "\C-xk" 'wl-draft-mimic-kill-buffer)) (defun wl-draft-overload-functions () - (let ((id '("Wanderlust: %12b"))) - (when wl-show-plug-status-on-modeline - (wl-push 'wl-plug-state-indicator id)) - (when wl-biff-check-folder-list - (wl-push 'wl-biff-state-indicator id)) - (when (cdr id) - (wl-push "" id)) - (setq mode-line-buffer-identification - (wl-mode-line-buffer-identification id))) + (wl-mode-line-buffer-identification) (local-set-key "\C-c\C-s" 'wl-draft-send);; override (wl-e21-setup-draft-toolbar) (wl-draft-overload-menubar)) diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 0f3f198..f04a897 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -1384,13 +1384,6 @@ If current line is group folder, all subfolders are marked." (message "No more unread folder") nil))) -;; Avoid byte-compile warning. -(eval-when-compile - (unless wl-on-xemacs - (defalias 'wl-xmas-setup-folder 'ignore)) - (unless wl-on-emacs21 - (defalias 'wl-e21-setup-folder 'ignore))) - (defun wl-folder-mode () "Major mode for Wanderlust Folder. See info under Wanderlust for full documentation. @@ -1409,20 +1402,11 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (setq wl-folder-buffer-cur-entity-id nil wl-folder-buffer-cur-path nil wl-folder-buffer-cur-point nil) - (let ((id '("Wanderlust: %12b"))) - (when wl-show-plug-status-on-modeline - (wl-push 'wl-plug-state-indicator id)) - (when wl-biff-check-folder-list - (wl-push 'wl-biff-state-indicator id)) - (when (cdr id) - (wl-push "" id)) - (setq mode-line-buffer-identification - (wl-mode-line-buffer-identification id))) + (wl-mode-line-buffer-identification) (easy-menu-add wl-folder-mode-menu) - (cond (wl-on-xemacs - (wl-xmas-setup-folder)) - (wl-on-emacs21 - (wl-e21-setup-folder))) + ;; This hook may contain the functions `wl-folder-init-icons' and + ;; `wl-setup-folder' for reasons of system internal to accord + ;; facilities for the Emacs variants. (run-hooks 'wl-folder-mode-hook)) (defun wl-folder-append-petname (realname petname) @@ -1436,10 +1420,6 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (wl-append wl-folder-petname-alist (list (cons realname petname))))) -(eval-and-compile - (unless (or wl-on-xemacs wl-on-emacs21) - (defalias 'wl-folder-init-icons 'ignore))) - (defun wl-folder (&optional arg) (interactive "P") (let (initialize) @@ -1449,7 +1429,6 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." (switch-to-buffer (get-buffer-create wl-folder-buffer-name)) (wl-folder-mode) (wl-folder-init) - (wl-folder-init-icons) (set-buffer wl-folder-buffer-name) (let ((inhibit-read-only t) (buffer-read-only nil)) @@ -1951,11 +1930,6 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." wl-score-cache nil )) -(eval-and-compile - (unless (or wl-on-xemacs wl-on-emacs21) - (defalias 'wl-plugged-init-icons 'ignore) - (defalias 'wl-biff-init-icons 'ignore))) - (defun wl-make-plugged-alist () (let ((entity-list (wl-folder-get-entity-list wl-folder-entity)) (add (not wl-reset-plugged-alist))) @@ -1976,9 +1950,9 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'." wl-nntp-posting-server elmo-default-nntp-port nil nil "nntp" add)) - (wl-plugged-init-icons) - (wl-biff-init-icons) - ;; user setting + ;; This hook may contain the functions `wl-plugged-init-icons' and + ;; `wl-biff-init-icons' for reasons of system internal to accord + ;; facilities for the Emacs variants. (run-hooks 'wl-make-plugged-hook))) (defvar wl-folder-init-func 'wl-local-folder-init) diff --git a/wl/wl-mule.el b/wl/wl-mule.el index f121cc3..3c1206d 100644 --- a/wl/wl-mule.el +++ b/wl/wl-mule.el @@ -171,16 +171,8 @@ Special commands: '("FCC" . wl-draft-fcc))) (defun wl-draft-overload-functions () - (let ((id '("Wanderlust: %12b"))) - (when wl-show-plug-status-on-modeline - (wl-push 'wl-plug-state-indicator id)) - (when wl-biff-check-folder-list - (wl-push 'wl-biff-state-indicator id)) - (when (cdr id) - (wl-push "" id)) - (setq mode-line-buffer-identification - (wl-mode-line-buffer-identification id))) - (local-set-key "\C-c\C-s" 'wl-draft-send) ; override + (wl-mode-line-buffer-identification) + (local-set-key "\C-c\C-s" 'wl-draft-send);; override (wl-draft-overload-menubar)) ;; for "ja-mule-canna-2.3.mini" on PocketBSD diff --git a/wl/wl-nemacs.el b/wl/wl-nemacs.el index cf7ef76..126da15 100644 --- a/wl/wl-nemacs.el +++ b/wl/wl-nemacs.el @@ -66,15 +66,7 @@ (list (cons t (mime-charset-to-coding-system default-mime-charset)))) (defun wl-draft-overload-functions () - (let ((id '("Wanderlust: %12b"))) - (if wl-show-plug-status-on-modeline - (wl-push 'wl-plug-state-indicator id)) - (if wl-biff-check-folder-list - (wl-push 'wl-biff-state-indicator id)) - (if (cdr id) - (wl-push "" id)) - (setq mode-line-buffer-identification - (wl-mode-line-buffer-identification id))) + (wl-mode-line-buffer-identification) (local-set-key "\C-c\C-y" 'wl-draft-yank-original) (local-set-key "\C-c\C-s" 'wl-draft-send) (local-set-key "\C-c\C-a" 'wl-draft-insert-x-face-field) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 95089fd..1e83c75 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -751,13 +751,6 @@ Returns nil if selecting folder was in failure." (regexp-quote wl-thread-space-str-internal))) (run-hooks 'wl-summary-buffer-set-folder-hook)) -;; Avoid byte-compile warning. -(eval-when-compile - (unless wl-on-xemacs - (defalias 'wl-xmas-setup-summary 'ignore)) - (unless wl-on-emacs21 - (defalias 'wl-e21-setup-summary 'ignore))) - (defun wl-summary-mode () "Major mode for reading threaded messages. The keys that are defined for this mode are:\\ @@ -813,31 +806,20 @@ q Goto folder mode. ;; (setq default-directory (or wl-tmp-dir (expand-file-name "~/"))) (setq buffer-read-only t) (setq truncate-lines t) -; (make-local-variable 'tab-width) -; (setq tab-width 1) +;; (make-local-variable 'tab-width) +;; (setq tab-width 1) (buffer-disable-undo (current-buffer)) (if wl-use-semi (setq wl-summary-buffer-message-redisplay-func 'wl-mmelmo-message-redisplay) (setq wl-summary-buffer-message-redisplay-func 'wl-normal-message-redisplay)) - ;; setup toolbar, dnd, etc. - (cond (wl-on-xemacs - (wl-xmas-setup-summary)) - (wl-on-emacs21 - (wl-e21-setup-summary))) - (let ((id '("Wanderlust: " - wl-summary-buffer-folder-indicator - wl-summary-buffer-unread-status))) - (when wl-show-plug-status-on-modeline - (wl-push 'wl-plug-state-indicator id)) - (when wl-biff-check-folder-list - (wl-push 'wl-biff-state-indicator id)) - (when (or wl-show-plug-status-on-modeline wl-biff-check-folder-list) - (wl-push "" id)) - (setq mode-line-buffer-identification - (wl-mode-line-buffer-identification id))) + (wl-mode-line-buffer-identification '("Wanderlust: " + wl-summary-buffer-folder-indicator + wl-summary-buffer-unread-status)) (easy-menu-add wl-summary-mode-menu) + ;; This hook may contain the function `wl-setup-summary' for reasons + ;; of system internal to accord facilities for the Emacs variants. (run-hooks 'wl-summary-mode-hook)) (defun wl-summary-overview-entity-compare-by-date (x y) diff --git a/wl/wl-util.el b/wl/wl-util.el index 1186e5e..1c1ef31 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -399,7 +399,32 @@ Insert User-Agent field instead of X-Mailer field." (concat "User-Agent: " wl-appname "/" wl-version " (" wl-codename ") " (wl-extended-emacs-version3 "/" t)))))) -(defalias 'wl-mode-line-buffer-identification 'identity) +(defun wl-mode-line-buffer-identification (&optional id) + (let ((priorities '(biff plug title))) + (let ((items (reverse wl-mode-line-display-priority-list)) + item) + (while items + (setq item (car items) + items (cdr items)) + (unless (memq item '(biff plug)) + (setq item 'title)) + (setq priorities (cons item (delq item priorities))))) + (let (priority result) + (while priorities + (setq priority (car priorities) + priorities (cdr priorities)) + (cond ((and wl-biff-check-folder-list (eq 'biff priority)) + (setq result (append result '(wl-biff-state-indicator)))) + ((and wl-show-plug-status-on-modeline (eq 'plug priority)) + (setq result (append result '(wl-plug-state-indicator)))) + (t + (setq result (append result (or id '("Wanderlust: %12b"))))))) + (prog1 + (setq mode-line-buffer-identification (if (stringp (car result)) + result + (cons "" result))) + (force-mode-line-update t))))) + (defalias 'wl-display-error 'elmo-display-error) (make-obsolete 'wl-display-error 'elmo-display-error) @@ -867,7 +892,8 @@ that `read' can handle, whenever this is possible." (defun wl-biff-start () (wl-biff-stop) (when wl-biff-check-folder-list - (start-itimer "wl-biff" 'wl-biff-check-folders + (wl-biff-check-folders) + (start-itimer wl-biff-timer-name 'wl-biff-check-folders wl-biff-check-interval wl-biff-check-interval)))) ((condition-case nil (require 'timer) (error nil));; FSFmacs 19+ @@ -878,6 +904,7 @@ that `read' can handle, whenever this is possible." (defun wl-biff-start () (when wl-biff-check-folder-list + (wl-biff-check-folders) (put 'wl-biff 'timer (run-at-time t wl-biff-check-interval 'wl-biff-event-handler)))) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 6861e3e..bb667cc 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -395,7 +395,9 @@ when `wl-prefetch-confirm' is non-nil." ;;;; Hooks (defvar wl-folder-mode-hook nil - "A hook called when wanderlust folder mode is started.") + "A hook called when wanderlust folder mode is started. This hook may +contain the functions `wl-folder-init-icons' and `wl-setup-folder' for +reasons of system internal to accord facilities for the Emacs variants.") (defvar wl-summary-toggle-disp-on-hook nil "A hook called when message is toggled.") (defvar wl-summary-toggle-disp-off-hook nil @@ -407,7 +409,10 @@ when `wl-prefetch-confirm' is non-nil." (defvar wl-summary-toggle-disp-folder-message-resumed-hook nil "A hook called when message window is resumed when folder is toggled.") (defvar wl-summary-mode-hook nil - "A hook called when summary mode is started.") + "A hook called when summary mode is started. This hook may contain +the function `wl-setup-summary' for reasons of system internal to +accord facilities for the Emacs variants.") + (defvar wl-summary-prepared-pre-hook nil "A hook called before the summary buffer has been generated.") (defvar wl-summary-prepared-hook nil @@ -491,7 +496,10 @@ when `wl-prefetch-confirm' is non-nil." (defvar wl-score-mode-hook nil "A hook called when score mode is started.") (defvar wl-make-plugged-hook nil - "A hook called when make plugged alist.") + "A hook called when make plugged alist. This hook may contain the +functions `wl-plugged-init-icons' and `wl-biff-init-icons' for reasons +of system internal to accord facilities for the Emacs variants.") + (defvar wl-plugged-exit-hook nil "A hook called when exit plugged mode.") @@ -1328,6 +1336,37 @@ every intervals specified by wl-biff-check-interval. " :type 'integer :group 'wl-folder) +(defcustom wl-biff-state-indicator-on "[〒]" + "String used to show biff status ON." + :type 'string + :group 'wl-folder) + +(defcustom wl-biff-state-indicator-off "[‐]" + "String used to show biff status OFF." + :type 'string + :group 'wl-folder) + +(defvar wl-biff-state-indicator wl-biff-state-indicator-off) + +(defcustom wl-mode-line-display-priority-list '(biff plug title) + "Displaying order of items to be shown in modeline. The first item will +be placed in the leftmost. The significant items are `biff' and `plug'; +otherwise, e.g. `title', corresponds to the things except for the biff +staus nor the plugged status. The default order is '(biff plug title) +even if the value of this option is set to nil. Here are some samples: + +;; Plugged status first: +\(setq wl-mode-line-display-priority-list '(plug)) + +;; Biff status, Title of Wanderlust, Plugged status: +\(setq wl-mode-line-display-priority-list '(biff title plug)) + +" + :type '(repeat (radio (const :format "%v " biff) + (const :format "%v " plug) + (sexp :tag "Other" :value title))) + :group 'wl-highlight) + (defcustom wl-interactive-send nil "*If non-nil, require your confirmation when sending draft message." :type 'boolean @@ -1891,8 +1930,8 @@ the `wl-highlight-message-headers' face." This is to prevent us from wasting time trying to fontify things like uuencoded files and large digests. If this is nil, all messages will be highlighted." - :type 'integer - :group 'wl-highlight) + :type 'integer + :group 'wl-highlight) ;; highilght about signature (of draft and message) (defcustom wl-highlight-signature-separator @@ -1912,8 +1951,8 @@ This variable can also be a regex. " :group 'wl-highlight) ;; highilght about mouse -(defcustom wl-use-highlight-mouse-line (and (or wl-on-xemacs wl-on-emacs21) - window-system) +(defcustom wl-use-highlight-mouse-line (and window-system + (>= emacs-major-version 19)) "*Highlight mouse line, if non nil." :type 'boolean :group 'wl-highlight) @@ -1977,10 +2016,6 @@ a symbol `xbm' to limit the image format to XBM even if XPM can be shown." (defvar wl-plug-state-indicator-off " [--] ") (defvar wl-plug-state-indicator 'wl-plug-state-indicator-on) -(defvar wl-biff-state-indicator-on "(M@il)") -(defvar wl-biff-state-indicator-off "(-)") -(defvar wl-biff-state-indicator wl-biff-state-indicator-off) - (defvar wl-show-plug-status-on-modeline t) ;; Advanced thread view. diff --git a/wl/wl-xmas.el b/wl/wl-xmas.el index 1809d35..fe586ff 100644 --- a/wl/wl-xmas.el +++ b/wl/wl-xmas.el @@ -37,6 +37,14 @@ (require 'wl-highlight) (defvar-maybe wl-draft-mode-map (make-sparse-keymap))) +(add-hook 'wl-folder-mode-hook 'wl-setup-folder) +(add-hook 'wl-folder-mode-hook 'wl-folder-init-icons) + +(add-hook 'wl-make-plugged-hook 'wl-biff-init-icons) +(add-hook 'wl-make-plugged-hook 'wl-plugged-init-icons) + +(add-hook 'wl-summary-mode-hook 'wl-setup-summary) + (defvar wl-use-toolbar (if (featurep 'toolbar) 'default-toolbar nil)) (defvar wl-plugged-glyph nil) (defvar wl-unplugged-glyph nil) @@ -418,13 +426,12 @@ (concat (wl-match-string 1 s) ", " (timezone-make-date-arpa-standard s (current-time-zone))))) - -(defun wl-xmas-setup-folder () +(defun wl-setup-folder () (and (featurep 'scrollbar) (set-specifier scrollbar-height (cons (current-buffer) 0))) (wl-xmas-setup-folder-toolbar)) -(defun wl-xmas-setup-summary () +(defun wl-setup-summary () (make-local-variable 'dragdrop-drop-functions) (setq dragdrop-drop-functions '((wl-dnd-default-drop-message t t))) (and (featurep 'scrollbar) @@ -506,15 +513,7 @@ Special commands: (define-key wl-draft-mode-map "\C-xk" 'wl-draft-mimic-kill-buffer)) (defun wl-draft-overload-functions () - (let ((id '("Wanderlust: %12b"))) - (when wl-show-plug-status-on-modeline - (wl-push 'wl-plug-state-indicator id)) - (when wl-biff-check-folder-list - (wl-push 'wl-biff-state-indicator id)) - (when (cdr id) - (wl-push "" id)) - (setq mode-line-buffer-identification - (wl-mode-line-buffer-identification id))) + (wl-mode-line-buffer-identification) (local-set-key "\C-c\C-s" 'wl-draft-send);; override (wl-xmas-setup-draft-toolbar) (wl-draft-overload-menubar)) diff --git a/wl/wl.el b/wl/wl.el index e1606da..9038829 100644 --- a/wl/wl.el +++ b/wl/wl.el @@ -86,8 +86,7 @@ 'wl-plug-state-indicator-on 'wl-plug-state-indicator-off)) (if wl-plugged - (wl-toggle-plugged t 'flush)) - (force-mode-line-update t)) + (wl-toggle-plugged t 'flush))) (defun wl-toggle-plugged (&optional arg queue-flush-only) (interactive) @@ -209,15 +208,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (setq major-mode 'wl-plugged-mode) (setq mode-name "Plugged") (easy-menu-add wl-plugged-mode-menu) - (let ((id '("Wanderlust: %12b"))) - (when wl-show-plug-status-on-modeline - (wl-push 'wl-plug-state-indicator id)) - (when wl-biff-check-folder-list - (wl-push 'wl-biff-state-indicator id)) - (when (cdr id) - (wl-push "" id)) - (setq mode-line-buffer-identification - (wl-mode-line-buffer-identification id))) + (wl-mode-line-buffer-identification) (setq wl-plugged-switch wl-plugged) (setq wl-plugged-alist-modified nil) (setq buffer-read-only t)