comparison lisp/mail/rmailsum.el @ 19111:e561070ee48c

(rmail-summary-mouse-goto-message): New function. (rmail-summary-mode-map): Bind it to Mouse-2.
author Richard M. Stallman <rms@gnu.org>
date Mon, 04 Aug 1997 01:42:50 +0000
parents 4b87104dcbc7
children a2a72d1e0970
comparison
equal deleted inserted replaced
19110:e83c7cde0db5 19111:e561070ee48c
807 807
808 (if rmail-summary-mode-map 808 (if rmail-summary-mode-map
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)
815 (define-key rmail-summary-mode-map "d" 'rmail-summary-delete-forward) 817 (define-key rmail-summary-mode-map "d" 'rmail-summary-delete-forward)
816 (define-key rmail-summary-mode-map "\C-d" 'rmail-summary-delete-backward) 818 (define-key rmail-summary-mode-map "\C-d" 'rmail-summary-delete-backward)
992 '("Next" . rmail-summary-next-all)) 994 '("Next" . rmail-summary-next-all))
993 995
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.
1007 If N is nil, use the message corresponding to point in the summary
1008 and move to that message in the Rmail buffer.
1009
1010 If NOWARN, don't say anything if N is out of range.
1011 If 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))
1009 (beginning-of-line) 1015 (beginning-of-line)
1010 (let* ((obuf (current-buffer)) 1016 (let* ((obuf (current-buffer))