summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-08-04 01:42:50 +0000
committerRichard M. Stallman <rms@gnu.org>1997-08-04 01:42:50 +0000
commit8a3e700329d4bb4003ece5938094b10b14e8e2e8 (patch)
treebe1d29d181ca09dcadb2fdac0f543bd08b51b8d5 /lisp/mail
parent51b8a27a32610c2f2f8f5e739f52315af203a948 (diff)
downloademacs-8a3e700329d4bb4003ece5938094b10b14e8e2e8.tar.gz
(rmail-summary-mouse-goto-message): New function.
(rmail-summary-mode-map): Bind it to Mouse-2.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/rmailsum.el20
1 files changed, 13 insertions, 7 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 6081062dde6..ac2ce1ac0b4 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -809,6 +809,8 @@ Search, the `unseen' attribute is restored.")
nil
(setq rmail-summary-mode-map (make-keymap))
(suppress-keymap rmail-summary-mode-map)
+
+ (define-key rmail-summary-mode-map [mouse-2] 'rmail-summary-mouse-goto-message)
(define-key rmail-summary-mode-map "a" 'rmail-summary-add-label)
(define-key rmail-summary-mode-map "b" 'rmail-summary-bury)
(define-key rmail-summary-mode-map "c" 'rmail-summary-continue)
@@ -994,15 +996,19 @@ Search, the `unseen' attribute is restored.")
(defvar rmail-summary-overlay nil)
(put 'rmail-summary-overlay 'permanent-local t)
-;; Go to message N in the summary buffer which is current,
-;; and in the corresponding Rmail buffer.
-;; If N is nil, use the message corresponding to point in the summary
-;; and move to that message in the Rmail buffer.
-
-;; If NOWARN, don't say anything if N is out of range.
-;; If SKIP-RMAIL, don't do anything to the Rmail buffer.
+(defun rmail-summary-mouse-goto-message (event)
+ "Select the message whose summary line you click on."
+ (interactive "@e")
+ (goto-char (posn-point (event-end event)))
+ (rmail-summary-goto-msg))
(defun rmail-summary-goto-msg (&optional n nowarn skip-rmail)
+ "Go to message N in the summary buffer and the Rmail buffer.
+If N is nil, use the message corresponding to point in the summary
+and move to that message in the Rmail buffer.
+
+If NOWARN, don't say anything if N is out of range.
+If SKIP-RMAIL, don't do anything to the Rmail buffer."
(interactive "P")
(if (consp n) (setq n (prefix-numeric-value n)))
(if (eobp) (forward-line -1))