diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2010-01-17 18:34:53 -0500 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2010-01-17 18:34:53 -0500 |
commit | 9295137d69b5a0494b54c49736bb86ef689ce9b0 (patch) | |
tree | d9abe151333149b9bdd2e09a0c6b98dd157ec90b /lisp/mail | |
parent | b1ea379790b65505005cf2250776cdef9a32acf9 (diff) | |
download | emacs-9295137d69b5a0494b54c49736bb86ef689ce9b0.tar.gz |
Fix handling of arbitrary YANK-ACTION functions from compose-mail.
* mail/sendmail.el (mail-yank-original): Set the mark if the
specified function for yanking does not do it.
Diffstat (limited to 'lisp/mail')
-rw-r--r-- | lisp/mail/sendmail.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 7004133f584..da8fe85da82 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -1505,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. |