summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2008-12-20 04:29:26 +0000
committerChong Yidong <cyd@stupidchicken.com>2008-12-20 04:29:26 +0000
commita8eed59f9ae0ffef0d7230e4e7b20324519be96c (patch)
treebb3dc90687ed291866fd6acfb376d6542627b8fe /lisp/mail
parent2b8e6500ca2300931b1eecce57838f02fb85edc6 (diff)
downloademacs-a8eed59f9ae0ffef0d7230e4e7b20324519be96c.tar.gz
(pmail-expunge-and-save): Call pmail-swap-buffers-maybe before
saving. (pmail-quit): Handling expunging manually, instead of calling pmail-expunge-and-save. (pmail-next-undeleted-message): If no other message can be shown, show the current one.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/pmail.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/mail/pmail.el b/lisp/mail/pmail.el
index ce48cf3ada1..689639316f0 100644
--- a/lisp/mail/pmail.el
+++ b/lisp/mail/pmail.el
@@ -1409,19 +1409,22 @@ Create the buffer if necessary."
(defun pmail-expunge-and-save ()
"Expunge and save PMAIL file."
(interactive)
- (pmail-expunge t)
(set-buffer pmail-buffer)
+ (pmail-expunge t)
+ (pmail-swap-buffers-maybe)
(save-buffer)
(if (pmail-summary-exists)
- (pmail-select-summary (set-buffer-modified-p nil))))
+ (pmail-select-summary (set-buffer-modified-p nil))
+ (pmail-show-message)))
(defun pmail-quit ()
"Quit out of PMAIL.
Hook `pmail-quit-hook' is run after expunging."
(interactive)
- ;; Determine if the buffers need to be swapped.
+ (set-buffer pmail-buffer)
+ (pmail-expunge t)
(pmail-swap-buffers-maybe)
- (pmail-expunge-and-save)
+ (save-buffer)
(when (boundp 'pmail-quit-hook)
(run-hooks 'pmail-quit-hook))
;; Don't switch to the summary buffer even if it was recently visible.
@@ -2696,6 +2699,7 @@ Returns t if a new message is being shown, nil otherwise."
(message "No previous nondeleted message"))
(if (> n 0)
(message "No following nondeleted message"))
+ (pmail-show-message-maybe pmail-current-message)
nil)))
(defun pmail-previous-undeleted-message (n)