1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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.
This commit is contained in:
Chong Yidong 2010-01-17 18:34:53 -05:00
parent b1ea379790
commit 9295137d69
2 changed files with 14 additions and 5 deletions

View file

@ -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.