summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2008-12-15 15:06:50 +0000
committerChong Yidong <cyd@stupidchicken.com>2008-12-15 15:06:50 +0000
commit97a424b85894aa746343787ff064301e4a86094c (patch)
tree97254f03f29b3fefd571d67d9dcb8e6037dae525 /lisp/mail
parentf520a2c629283929575ac14cf4d172e5cd88cd3b (diff)
downloademacs-97a424b85894aa746343787ff064301e4a86094c.tar.gz
(pmail-search): Call pmail-swap-buffers-maybe.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/pmail.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/mail/pmail.el b/lisp/mail/pmail.el
index 7b236f52418..89e8ab69037 100644
--- a/lisp/mail/pmail.el
+++ b/lisp/mail/pmail.el
@@ -3128,9 +3128,16 @@ See also user-option `pmail-confirm-expunge'."
"Erase deleted messages from Pmail file and summary buffer."
(interactive)
(when (pmail-expunge-confirmed)
- (pmail-only-expunge dont-show)
- (if (pmail-summary-exists)
- (pmail-select-summary (pmail-update-summary)))))
+ (let ((old-total pmail-total-messages)
+ (opoint (with-current-buffer pmail-buffer
+ (when pmail-buffers-swapped-p
+ (point)))))
+ (pmail-only-expunge dont-show)
+ (if (pmail-summary-exists)
+ (pmail-select-summary (pmail-update-summary))
+ (pmail-show-message pmail-current-message)
+ (if (and (eq old-total pmail-total-messages) opoint)
+ (goto-char opoint))))))
;;;; *** Pmail Mailing Commands ***