diff options
| author | Kenichi Handa <handa@m17n.org> | 2011-01-14 13:08:30 +0900 |
|---|---|---|
| committer | Kenichi Handa <handa@m17n.org> | 2011-01-14 13:08:30 +0900 |
| commit | 66399c0a66e87c20edad6a7eb2474981d9bc7e4e (patch) | |
| tree | 9998842124f34c1c0e75d6f9b796fd690ed2ea6d /lisp/gnus/message.el | |
| parent | 1a6a03e4a30d48bdbb3f188c7de0c0ab09e16992 (diff) | |
| parent | c88aaf48b207664ac714d161061488c86b0963d9 (diff) | |
| download | emacs-66399c0a66e87c20edad6a7eb2474981d9bc7e4e.tar.gz | |
merge emacs-23
Diffstat (limited to 'lisp/gnus/message.el')
| -rw-r--r-- | lisp/gnus/message.el | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 0ea0df46060..63fcf500189 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4023,12 +4023,32 @@ Instead, just auto-save the buffer and then bury it." (defun message-bury (buffer) "Bury this mail BUFFER." - (let ((newbuf (other-buffer buffer))) - (bury-buffer buffer) - (if (and (window-dedicated-p (selected-window)) + (let ((newbuf (other-buffer (current-buffer)))) + (bury-buffer (current-buffer)) + (if (and (window-dedicated-p (frame-selected-window)) (not (null (delq (selected-frame) (visible-frame-list))))) (delete-frame (selected-frame)) - (switch-to-buffer newbuf)))) + ;; Temporary hack to make this behave like `mail-bury', when + ;; used with Rmail. Replaced in Emacs 24 with + (let (rmail-flag summary-buffer) + (and (not (one-window-p)) + (with-current-buffer + (window-buffer (next-window (selected-window) 'not)) + (setq rmail-flag (eq major-mode 'rmail-mode)) + (setq summary-buffer + (and (if (boundp 'mail-bury-selects-summary) + mail-bury-selects-summary + t) + (boundp 'rmail-summary-buffer) + rmail-summary-buffer + (buffer-name rmail-summary-buffer) + (not (get-buffer-window rmail-summary-buffer)) + rmail-summary-buffer)))) + (if rmail-flag + ;; If the Rmail buffer has a summary, show that. + (if summary-buffer (switch-to-buffer summary-buffer) + (delete-window)) + (switch-to-buffer newbuf)))))) (defun message-send (&optional arg) "Send the message in the current buffer. |
