# HG changeset patch # User Chong Yidong # Date 1263771293 18000 # Node ID bcf8645ca6196f8635be650c521a9c051e40a2a3 # Parent 2ed4eab78ca327de6c5dfa0533456c0357948f22 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. diff -r 2ed4eab78ca3 -r bcf8645ca619 lisp/ChangeLog --- a/lisp/ChangeLog Sun Jan 17 18:33:55 2010 -0500 +++ b/lisp/ChangeLog Sun Jan 17 18:34:53 2010 -0500 @@ -1,3 +1,8 @@ +2010-01-17 Chong Yidong + + * mail/sendmail.el (mail-yank-original): Set the mark if the + specified function for yanking does not do it. + 2010-01-17 Dan Nicolaescu * vc.el (with-vc-properties): Deal with directory arguments. (Bug#5298) diff -r 2ed4eab78ca3 -r bcf8645ca619 lisp/mail/sendmail.el --- a/lisp/mail/sendmail.el Sun Jan 17 18:33:55 2010 -0500 +++ b/lisp/mail/sendmail.el Sun Jan 17 18:34:53 2010 -0500 @@ -1505,14 +1505,18 @@ (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.