From 5c178c7fabbe349a52431fff048359572337acb8 Mon Sep 17 00:00:00 2001 From: kaoru Date: Mon, 3 Sep 2001 09:56:51 +0000 Subject: [PATCH] 2001-09-03 TAKAHASHI Kaoru * 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 * 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. --- wl/ChangeLog | 11 +++++++++++ wl/wl-e21.el | 17 +++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index bc6d785..79f6d9e 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,14 @@ +2001-09-03 TAKAHASHI Kaoru + + * 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 + + * 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 * wl-vars.el (wl-ldap-objectclass): New user option. diff --git a/wl/wl-e21.el b/wl/wl-e21.el index 17135fc..b3689aa 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -71,6 +71,15 @@ (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) @@ -453,8 +462,8 @@ (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 @@ -484,8 +493,8 @@ (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 -- 1.7.10.4