aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-01-28 09:58:27 +0800
committerChong Yidong2012-01-28 09:58:27 +0800
commitd7a9e63bd617a7941a03f0938c8f8cce4220bb71 (patch)
treeb2e91867eb48fafd2903ddbafe9f12dc0b26380e
parent2e7f3bea5f5a01c0fa9c74b897d834b783f13462 (diff)
downloademacs-d7a9e63bd617a7941a03f0938c8f8cce4220bb71.tar.gz
emacs-d7a9e63bd617a7941a03f0938c8f8cce4220bb71.zip
* lisp/mail/rmail.el (rmail-start-mail): Add send-action again.
(rmail-mail-return): Switch to NEWBUF only if it is non-nil. Fixes: debbugs:10625
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/mail/rmail.el50
2 files changed, 33 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d8378ef9838..fb7bdffd426 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12012-01-28 Chong Yidong <cyd@gnu.org> 12012-01-28 Chong Yidong <cyd@gnu.org>
2 2
3 * mail/rmail.el (rmail-start-mail): Add send-action again (Bug#10625).
4 (rmail-mail-return): Switch to NEWBUF only if it is non-nil.
5
3 * cus-edit.el (custom-buffer-create-internal): Fix search button 6 * cus-edit.el (custom-buffer-create-internal): Fix search button
4 action (Bug#10542). 7 action (Bug#10542).
5 8
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 2a8140dd972..813912f2e9b 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -3584,15 +3584,18 @@ does not pop any summary buffer."
3584 (if (stringp subject) (setq subject (rfc2047-decode-string subject))) 3584 (if (stringp subject) (setq subject (rfc2047-decode-string subject)))
3585 (prog1 3585 (prog1
3586 (compose-mail to subject other-headers noerase 3586 (compose-mail to subject other-headers noerase
3587 switch-function yank-action sendactions) 3587 switch-function yank-action sendactions
3588 `(rmail-mail-return ,replybuffer))
3588 (if (eq switch-function 'switch-to-buffer-other-frame) 3589 (if (eq switch-function 'switch-to-buffer-other-frame)
3589 ;; This is not a standard frame parameter; nothing except 3590 ;; This is not a standard frame parameter; nothing except
3590 ;; sendmail.el looks at it. 3591 ;; sendmail.el looks at it.
3591 (modify-frame-parameters (selected-frame) 3592 (modify-frame-parameters (selected-frame)
3592 '((mail-dedicated-frame . t))))))) 3593 '((mail-dedicated-frame . t)))))))
3593 3594
3594(defun rmail-mail-return (&optional newbuf) 3595(defun rmail-mail-return (&optional newbuf)
3595 "NEWBUF is a buffer to switch to." 3596 "Try to return to Rmail from the mail window.
3597If optional argument NEWBUF is specified, it is the Rmail buffer
3598to switch to."
3596 (cond 3599 (cond
3597 ;; If there is only one visible frame with no special handling, 3600 ;; If there is only one visible frame with no special handling,
3598 ;; consider deleting the mail window to return to Rmail. 3601 ;; consider deleting the mail window to return to Rmail.
@@ -3602,23 +3605,30 @@ does not pop any summary buffer."
3602 (cdr (assq 'mail-dedicated-frame 3605 (cdr (assq 'mail-dedicated-frame
3603 (frame-parameters)))))) 3606 (frame-parameters))))))
3604 (let (rmail-flag summary-buffer) 3607 (let (rmail-flag summary-buffer)
3605 (and (not (one-window-p)) 3608 (unless (one-window-p)
3606 (with-current-buffer 3609 (with-current-buffer
3607 (window-buffer (next-window (selected-window) 'not)) 3610 (window-buffer (next-window (selected-window) 'not))
3608 (setq rmail-flag (eq major-mode 'rmail-mode)) 3611 (setq rmail-flag (eq major-mode 'rmail-mode))
3609 (setq summary-buffer 3612 (setq summary-buffer
3610 (and (boundp 'mail-bury-selects-summary) 3613 (and (boundp 'mail-bury-selects-summary)
3611 mail-bury-selects-summary 3614 mail-bury-selects-summary
3612 (boundp 'rmail-summary-buffer) 3615 (boundp 'rmail-summary-buffer)
3613 rmail-summary-buffer 3616 rmail-summary-buffer
3614 (buffer-name rmail-summary-buffer) 3617 (buffer-name rmail-summary-buffer)
3615 (not (get-buffer-window rmail-summary-buffer)) 3618 (not (get-buffer-window rmail-summary-buffer))
3616 rmail-summary-buffer)))) 3619 rmail-summary-buffer))))
3617 (if rmail-flag 3620 (cond ((null rmail-flag)
3618 ;; If the Rmail buffer has a summary, show that. 3621 ;; If the Rmail buffer is not in the next window, switch
3619 (if summary-buffer (switch-to-buffer summary-buffer) 3622 ;; directly to the Rmail buffer specified by NEWBUF.
3620 (delete-window)) 3623 (if newbuf
3621 (switch-to-buffer newbuf)))) 3624 (switch-to-buffer newbuf)))
3625 ;; If the Rmail buffer is in the next window, switch to
3626 ;; the summary buffer if `mail-bury-selects-summary' is
3627 ;; non-nil. Otherwise just delete this window.
3628 (summary-buffer
3629 (switch-to-buffer summary-buffer))
3630 (t
3631 (delete-window)))))
3622 ;; If the frame was probably made for this buffer, the user 3632 ;; If the frame was probably made for this buffer, the user
3623 ;; probably wants to delete it now. 3633 ;; probably wants to delete it now.
3624 ((display-multi-frame-p) 3634 ((display-multi-frame-p)