Mercurial > emacs
comparison lisp/gnus/message.el @ 112261:0071290a6df9
* message.el (message-bury): Add special-case handling for Rmail.
This should not be merged into the trunk.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 12 Jan 2011 23:24:31 -0500 |
parents | 353c9b74c8b3 |
children | cc0887b67703 |
comparison
equal
deleted
inserted
replaced
112260:b3d66f88eeae | 112261:0071290a6df9 |
---|---|
4021 (message-disassociate-draft))) | 4021 (message-disassociate-draft))) |
4022 (message-do-actions actions)))) | 4022 (message-do-actions actions)))) |
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. |
4035 If `message-interactive' is non-nil, wait for success indication or | 4055 If `message-interactive' is non-nil, wait for success indication or |
4036 error messages, and inform user. | 4056 error messages, and inform user. |