aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-12-20 04:29:26 +0000
committerChong Yidong2008-12-20 04:29:26 +0000
commita8eed59f9ae0ffef0d7230e4e7b20324519be96c (patch)
treebb3dc90687ed291866fd6acfb376d6542627b8fe
parent2b8e6500ca2300931b1eecce57838f02fb85edc6 (diff)
downloademacs-a8eed59f9ae0ffef0d7230e4e7b20324519be96c.tar.gz
emacs-a8eed59f9ae0ffef0d7230e4e7b20324519be96c.zip
(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.
-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."
1409(defun pmail-expunge-and-save () 1409(defun pmail-expunge-and-save ()
1410 "Expunge and save PMAIL file." 1410 "Expunge and save PMAIL file."
1411 (interactive) 1411 (interactive)
1412 (pmail-expunge t)
1413 (set-buffer pmail-buffer) 1412 (set-buffer pmail-buffer)
1413 (pmail-expunge t)
1414 (pmail-swap-buffers-maybe)
1414 (save-buffer) 1415 (save-buffer)
1415 (if (pmail-summary-exists) 1416 (if (pmail-summary-exists)
1416 (pmail-select-summary (set-buffer-modified-p nil)))) 1417 (pmail-select-summary (set-buffer-modified-p nil))
1418 (pmail-show-message)))
1417 1419
1418(defun pmail-quit () 1420(defun pmail-quit ()
1419 "Quit out of PMAIL. 1421 "Quit out of PMAIL.
1420Hook `pmail-quit-hook' is run after expunging." 1422Hook `pmail-quit-hook' is run after expunging."
1421 (interactive) 1423 (interactive)
1422 ;; Determine if the buffers need to be swapped. 1424 (set-buffer pmail-buffer)
1425 (pmail-expunge t)
1423 (pmail-swap-buffers-maybe) 1426 (pmail-swap-buffers-maybe)
1424 (pmail-expunge-and-save) 1427 (save-buffer)
1425 (when (boundp 'pmail-quit-hook) 1428 (when (boundp 'pmail-quit-hook)
1426 (run-hooks 'pmail-quit-hook)) 1429 (run-hooks 'pmail-quit-hook))
1427 ;; Don't switch to the summary buffer even if it was recently visible. 1430 ;; 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."
2696 (message "No previous nondeleted message")) 2699 (message "No previous nondeleted message"))
2697 (if (> n 0) 2700 (if (> n 0)
2698 (message "No following nondeleted message")) 2701 (message "No following nondeleted message"))
2702 (pmail-show-message-maybe pmail-current-message)
2699 nil))) 2703 nil)))
2700 2704
2701(defun pmail-previous-undeleted-message (n) 2705(defun pmail-previous-undeleted-message (n)