;;; rmailsum.el --- make summary buffers for the mail reader
-;; Copyright (C) 1985, 1993, 1994, 1995, 1996, 2000
+;; Copyright (C) 1985, 1993, 1994, 1995, 1996, 2000, 2001
;; Free Software Foundation, Inc.
;; Maintainer: FSF
\f
;;;; *** Rmail Summary Mailing Commands ***
+(defun rmail-summary-override-mail-send-and-exit ()
+ "Replace bindings to 'mail-send-and-exit with 'rmail-summary-send-and-exit"
+ (use-local-map (copy-keymap (current-local-map)))
+ (dolist (key (where-is-internal 'mail-send-and-exit))
+ (define-key (current-local-map) key 'rmail-summary-send-and-exit)))
+
(defun rmail-summary-mail ()
"Send mail in another window.
While composing the message, use \\[mail-yank-original] to yank the
(select-window window)
(set-buffer rmail-buffer)))
(rmail-start-mail nil nil nil nil nil (current-buffer))
- (use-local-map (copy-keymap (current-local-map)))
- (define-key (current-local-map)
- "\C-c\C-c" 'rmail-summary-send-and-exit))
+ (rmail-summary-override-mail-send-and-exit))
(defun rmail-summary-continue ()
"Continue composing outgoing message previously being composed."
(select-window window)
(set-buffer rmail-buffer)))
(rmail-reply just-sender)
- (use-local-map (copy-keymap (current-local-map)))
- (define-key (current-local-map)
- "\C-c\C-c" 'rmail-summary-send-and-exit))
+ (rmail-summary-override-mail-send-and-exit))
(defun rmail-summary-retry-failure ()
"Edit a mail message which is based on the contents of the current message.
(select-window window)
(set-buffer rmail-buffer)))
(rmail-retry-failure)
- (use-local-map (copy-keymap (current-local-map)))
- (define-key (current-local-map)
- "\C-c\C-c" 'rmail-summary-send-and-exit))
+ (rmail-summary-override-mail-send-and-exit))
(defun rmail-summary-send-and-exit ()
"Send mail reply and return to summary buffer."
(select-window window)
(set-buffer rmail-buffer)))
(rmail-forward resend)
- (use-local-map (copy-keymap (current-local-map)))
- (define-key (current-local-map)
- "\C-c\C-c" 'rmail-summary-send-and-exit)))
+ (rmail-summary-override-mail-send-and-exit)))
(defun rmail-summary-resend ()
"Resend current message using 'rmail-resend'."