diff options
| author | Richard M. Stallman <rms@gnu.org> | 2012-04-17 19:23:20 -0400 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 2012-04-17 19:23:20 -0400 |
| commit | 5f6530ea79767d596c1950a94d63415475e5b1df (patch) | |
| tree | bc57c93f9ee886812a5e6768f5a6b0b771700733 /lisp/mail/sendmail.el | |
| parent | aba027e80c6d2776d7ec35747308367351871e98 (diff) | |
| download | emacs-5f6530ea79767d596c1950a94d63415475e5b1df.tar.gz | |
Fix logic for returning to and yanking from Rmail buffer.
Diffstat (limited to 'lisp/mail/sendmail.el')
| -rw-r--r-- | lisp/mail/sendmail.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index f8958a691b2..0b0f2795610 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -863,8 +863,11 @@ Prefix arg means don't delete this window." ;; even if this message was not started by an Rmail command. (unless return-action (dolist (buffer (buffer-list)) - (if (eq (buffer-local-value 'major-mode buffer) 'rmail-mode) - (setq return-action `(rmail-mail-return ,newbuf))))) + (if (and (eq (buffer-local-value 'major-mode buffer) 'rmail-mode) + (null return-action) + ;; Don't match message-viewer buffer. + (not (string-match "\\` " (buffer-name buffer)))) + (setq return-action `(rmail-mail-return ,buffer))))) (if (and (null arg) return-action) (apply (car return-action) (cdr return-action)) (switch-to-buffer newbuf)))) |
