diff options
| author | Chong Yidong | 2011-01-12 23:24:31 -0500 |
|---|---|---|
| committer | Chong Yidong | 2011-01-12 23:24:31 -0500 |
| commit | 5399653b53f7b74decc75402bddd5f979516fcbe (patch) | |
| tree | c5ad9a3cd8b366b9f71ed0282347be6d7dbb9cba | |
| parent | 07ee9351461ff93feabd66f36ccfdc0ff7b5dcfc (diff) | |
| download | emacs-5399653b53f7b74decc75402bddd5f979516fcbe.tar.gz emacs-5399653b53f7b74decc75402bddd5f979516fcbe.zip | |
* message.el (message-bury): Add special-case handling for Rmail.
This should not be merged into the trunk.
| -rw-r--r-- | lisp/gnus/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 28 |
2 files changed, 28 insertions, 4 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 6a363c0b4f1..eecbe978c29 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-01-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * message.el (message-bury): Add special-case handling for Rmail. | ||
| 4 | |||
| 1 | 2011-01-12 Glenn Morris <rgm@gnu.org> | 5 | 2011-01-12 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * message.el (message-mail): A compose-mail function should | 7 | * message.el (message-mail): A compose-mail function should |
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." | |||
| 4023 | 4023 | ||
| 4024 | (defun message-bury (buffer) | 4024 | (defun message-bury (buffer) |
| 4025 | "Bury this mail BUFFER." | 4025 | "Bury this mail BUFFER." |
| 4026 | (let ((newbuf (other-buffer buffer))) | 4026 | (let ((newbuf (other-buffer (current-buffer)))) |
| 4027 | (bury-buffer buffer) | 4027 | (bury-buffer (current-buffer)) |
| 4028 | (if (and (window-dedicated-p (selected-window)) | 4028 | (if (and (window-dedicated-p (frame-selected-window)) |
| 4029 | (not (null (delq (selected-frame) (visible-frame-list))))) | 4029 | (not (null (delq (selected-frame) (visible-frame-list))))) |
| 4030 | (delete-frame (selected-frame)) | 4030 | (delete-frame (selected-frame)) |
| 4031 | (switch-to-buffer newbuf)))) | 4031 | ;; Temporary hack to make this behave like `mail-bury', when |
| 4032 | ;; used with Rmail. Replaced in Emacs 24 with | ||
| 4033 | (let (rmail-flag summary-buffer) | ||
| 4034 | (and (not (one-window-p)) | ||
| 4035 | (with-current-buffer | ||
| 4036 | (window-buffer (next-window (selected-window) 'not)) | ||
| 4037 | (setq rmail-flag (eq major-mode 'rmail-mode)) | ||
| 4038 | (setq summary-buffer | ||
| 4039 | (and (if (boundp 'mail-bury-selects-summary) | ||
| 4040 | mail-bury-selects-summary | ||
| 4041 | t) | ||
| 4042 | (boundp 'rmail-summary-buffer) | ||
| 4043 | rmail-summary-buffer | ||
| 4044 | (buffer-name rmail-summary-buffer) | ||
| 4045 | (not (get-buffer-window rmail-summary-buffer)) | ||
| 4046 | rmail-summary-buffer)))) | ||
| 4047 | (if rmail-flag | ||
| 4048 | ;; If the Rmail buffer has a summary, show that. | ||
| 4049 | (if summary-buffer (switch-to-buffer summary-buffer) | ||
| 4050 | (delete-window)) | ||
| 4051 | (switch-to-buffer newbuf)))))) | ||
| 4032 | 4052 | ||
| 4033 | (defun message-send (&optional arg) | 4053 | (defun message-send (&optional arg) |
| 4034 | "Send the message in the current buffer. | 4054 | "Send the message in the current buffer. |