]> code.delx.au - gnu-emacs/blobdiff - lisp/mail/sendmail.el
merge conflict
[gnu-emacs] / lisp / mail / sendmail.el
index 59cd70aa578ec845787c81ca610ff3659469bd1b..da8fe85da82e538db4084f280fb8d7db0166e487 100644 (file)
@@ -1,7 +1,7 @@
 ;;; sendmail.el --- mail sending commands for Emacs.  -*- byte-compile-dynamic: t -*-
 
 ;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1998, 2000,
-;;   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;;   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 ;;   Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
@@ -221,8 +221,7 @@ This file need not actually exist."
 
 ;;;###autoload
 (defcustom mail-setup-hook nil
-  "Normal hook, run each time a new outgoing mail message is initialized.
-The function `mail-setup' runs this hook."
+  "Normal hook, run each time a new outgoing message is initialized."
   :type 'hook
   :options '(fortune-to-signature spook mail-abbrevs-setup)
   :group 'sendmail)
@@ -816,7 +815,7 @@ Prefix arg means don't delete this window."
          (switch-to-buffer newbuf))))))
 
 (defcustom mail-send-hook nil
-  "Hook run just before sending mail with `mail-send'."
+  "Hook run just before sending a message."
   :type 'hook
   :options '(flyspell-mode-off)
   :group 'sendmail)
@@ -1506,14 +1505,18 @@ and don't delete any header fields."
   (interactive "P")
   (if mail-reply-action
       (let ((start (point))
-           (original mail-reply-action))
+           (original mail-reply-action)
+           (omark (mark t)))
        (and (consp original) (eq (car original) 'insert-buffer)
             (setq original (nth 1 original)))
        (if (consp original)
-           (apply (car original) (cdr original))
-         ;; If the original message is in another window in the same frame,
-         ;; delete that window to save screen space.
-         ;; t means don't alter other frames.
+           (progn
+             ;; Call yank function, and set the mark if it doesn't.
+             (apply (car original) (cdr original))
+             (if (eq omark (mark t))
+                 (push-mark (point))))
+         ;; If the original message is in another window in the same
+         ;; frame, delete that window to save space.
          (delete-windows-on original t)
          (with-no-warnings
            ;; We really want this to set mark.