aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-04 01:42:50 +0000
committerRichard M. Stallman1997-08-04 01:42:50 +0000
commit4ab455e6c8f8935cc96dde1d1bc18c2ded225c68 (patch)
treee61a72d6e740176065b969ac7f9b948c22a943df
parentd1f9f44105913bb30fc2174579c270d677e6d27e (diff)
downloademacs-4ab455e6c8f8935cc96dde1d1bc18c2ded225c68.tar.gz
emacs-4ab455e6c8f8935cc96dde1d1bc18c2ded225c68.zip
(rmail-summary-mouse-goto-message): New function.
(rmail-summary-mode-map): Bind it to Mouse-2.
-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.")
809 nil 809 nil
810 (setq rmail-summary-mode-map (make-keymap)) 810 (setq rmail-summary-mode-map (make-keymap))
811 (suppress-keymap rmail-summary-mode-map) 811 (suppress-keymap rmail-summary-mode-map)
812
813 (define-key rmail-summary-mode-map [mouse-2] 'rmail-summary-mouse-goto-message)
812 (define-key rmail-summary-mode-map "a" 'rmail-summary-add-label) 814 (define-key rmail-summary-mode-map "a" 'rmail-summary-add-label)
813 (define-key rmail-summary-mode-map "b" 'rmail-summary-bury) 815 (define-key rmail-summary-mode-map "b" 'rmail-summary-bury)
814 (define-key rmail-summary-mode-map "c" 'rmail-summary-continue) 816 (define-key rmail-summary-mode-map "c" 'rmail-summary-continue)
@@ -994,15 +996,19 @@ Search, the `unseen' attribute is restored.")
994(defvar rmail-summary-overlay nil) 996(defvar rmail-summary-overlay nil)
995(put 'rmail-summary-overlay 'permanent-local t) 997(put 'rmail-summary-overlay 'permanent-local t)
996 998
997;; Go to message N in the summary buffer which is current, 999(defun rmail-summary-mouse-goto-message (event)
998;; and in the corresponding Rmail buffer. 1000 "Select the message whose summary line you click on."
999;; If N is nil, use the message corresponding to point in the summary 1001 (interactive "@e")
1000;; and move to that message in the Rmail buffer. 1002 (goto-char (posn-point (event-end event)))
1001 1003 (rmail-summary-goto-msg))
1002;; If NOWARN, don't say anything if N is out of range.
1003;; If SKIP-RMAIL, don't do anything to the Rmail buffer.
1004 1004
1005(defun rmail-summary-goto-msg (&optional n nowarn skip-rmail) 1005(defun rmail-summary-goto-msg (&optional n nowarn skip-rmail)
1006 "Go to message N in the summary buffer and the Rmail buffer.
1007If N is nil, use the message corresponding to point in the summary
1008and move to that message in the Rmail buffer.
1009
1010If NOWARN, don't say anything if N is out of range.
1011If SKIP-RMAIL, don't do anything to the Rmail buffer."
1006 (interactive "P") 1012 (interactive "P")
1007 (if (consp n) (setq n (prefix-numeric-value n))) 1013 (if (consp n) (setq n (prefix-numeric-value n)))
1008 (if (eobp) (forward-line -1)) 1014 (if (eobp) (forward-line -1))