From e718f1b5701e993927fc0932f94c7f4c3f3b4714 Mon Sep 17 00:00:00 2001 From: kaoru Date: Mon, 3 Sep 2001 09:51:42 +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 c3a184c..43546d8 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-31 Yuuichi Teranishi * wl-highlight.el (wl-highlight-summary-current-line): diff --git a/wl/wl-e21.el b/wl/wl-e21.el index be91587..a3db349 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -72,6 +72,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) @@ -454,8 +463,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 @@ -485,8 +494,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