+2001-09-03 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * wl-e21.el (make-mode-line-mouse-map): Import from Emacs
+ 21.0.105. For Emacs 21.0.104 or earlier.
+
+2001-09-03 Takuo KITAME <kitame@northeye.org>
+
+ * wl-e21.el (wl-plugged-init-icons): Use
+ `make-mode-line-mouse-map' instead of `make-mode-line-mouse2-map'.
+ (wl-biff-init-icons): Ditto.
+
2001-08-06 SAITO Atsunori <sai@yedo.com>
* wl-vars.el (wl-ldap-objectclass): New user option.
(defvar-maybe wl-folder-mode-map (make-sparse-keymap))
(defvar-maybe wl-draft-mode-map (make-sparse-keymap)))
+;; For Emacs 21.0.104 or earlier
+(defun-maybe make-mode-line-mouse-map (mouse function) "\
+Return a keymap with single entry for mouse key MOUSE on the mode line.
+MOUSE is defined to run function FUNCTION with no args in the buffer
+corresponding to the mode line clicked."
+ (let ((map (make-sparse-keymap)))
+ (define-key map (vector 'mode-line mouse) function)
+ map))
+
(add-hook 'wl-folder-mode-hook 'wl-setup-folder)
(add-hook 'wl-folder-mode-hook 'wl-folder-init-icons)
(defun wl-plugged-init-icons ()
(let ((props (when (display-mouse-p)
- (list 'local-map (purecopy (make-mode-line-mouse2-map
- #'wl-toggle-plugged))
+ (list 'local-map (purecopy (make-mode-line-mouse-map
+ 'mouse-2 #'wl-toggle-plugged))
'help-echo "mouse-2 toggles plugged status"))))
(if (wl-e21-display-image-p)
(progn
(defun wl-biff-init-icons ()
(let ((props (when (display-mouse-p)
- (list 'local-map (purecopy (make-mode-line-mouse2-map
- #'wl-biff-check-folders))
+ (list 'local-map (purecopy (make-mode-line-mouse-map
+ 'mouse-2 #'wl-biff-check-folders))
'help-echo "mouse-2 checks new mails"))))
(if (wl-e21-display-image-p)
(progn