[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog mail/rmail.el
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog mail/rmail.el |
Date: |
Tue, 07 Apr 2009 03:01:14 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 09/04/07 03:01:13
Modified files:
lisp : ChangeLog
lisp/mail : rmail.el
Log message:
(rmail-expunge-and-save): Let rmail-expunge show the message.
(rmail-quit): Mark summary unmodified.
(rmail-expunge): Doc fix. Always show a message. (Bug#2763)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15555&r2=1.15556
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/rmail.el?cvsroot=emacs&r1=1.530&r2=1.531
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15555
retrieving revision 1.15556
diff -u -b -r1.15555 -r1.15556
--- ChangeLog 7 Apr 2009 01:49:40 -0000 1.15555
+++ ChangeLog 7 Apr 2009 03:01:08 -0000 1.15556
@@ -1,3 +1,10 @@
+2009-04-07 Glenn Morris <address@hidden>
+
+ * mail/rmail.el (rmail-expunge-and-save): Let rmail-expunge show the
+ message.
+ (rmail-quit): Mark summary unmodified.
+ (rmail-expunge): Doc fix. Always show a message. (Bug#2763)
+
2009-04-07 Chong Yidong <address@hidden>
* vc-bzr.el (vc-bzr-log-view-mode): Tweak
Index: mail/rmail.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mail/rmail.el,v
retrieving revision 1.530
retrieving revision 1.531
diff -u -b -r1.530 -r1.531
--- mail/rmail.el 22 Mar 2009 14:50:42 -0000 1.530
+++ mail/rmail.el 7 Apr 2009 03:01:12 -0000 1.531
@@ -1430,13 +1430,12 @@
"Expunge and save RMAIL file."
(interactive)
(set-buffer rmail-buffer)
- (rmail-expunge t)
+ (rmail-expunge)
;; No need to swap buffers: rmail-write-region-annotate takes care of it.
;; (rmail-swap-buffers-maybe)
(save-buffer)
(if (rmail-summary-exists)
- (rmail-select-summary (set-buffer-modified-p nil)))
- (rmail-show-message))
+ (rmail-select-summary (set-buffer-modified-p nil))))
(defun rmail-quit ()
"Quit out of RMAIL.
@@ -1449,6 +1448,8 @@
(run-hooks 'rmail-quit-hook))
;; Don't switch to the summary buffer even if it was recently visible.
(when rmail-summary-buffer
+ (with-current-buffer rmail-summary-buffer
+ (set-buffer-modified-p nil))
(replace-buffer-in-windows rmail-summary-buffer)
(bury-buffer rmail-summary-buffer))
(if rmail-enable-mime
@@ -3170,6 +3171,8 @@
"Return t if deleted message should be expunged. If necessary, ask the user.
See also user-option `rmail-confirm-expunge'."
(set-buffer rmail-buffer)
+ ;; FIXME shouldn't this return nil if there is nothing to expunge?
+ ;; Eg to save rmail-expunge wasting its time?
(or (not (stringp rmail-deleted-vector))
(not (string-match "D" rmail-deleted-vector))
(null rmail-confirm-expunge)
@@ -3260,31 +3263,43 @@
(goto-char (+ (point-min) opoint))
(goto-char (+ (point) opoint))))))
+;; The DONT-SHOW argument is new in 23. Does not seem very important.
(defun rmail-expunge (&optional dont-show)
- "Erase deleted messages from Rmail file and summary buffer."
+ "Erase deleted messages from Rmail file and summary buffer.
+This always shows a message (so as not to leave the Rmail buffer
+unswapped), and always updates any summary (so that it remains
+consistent with the Rmail buffer). If DONT-SHOW is non-nil, it
+does not pop any summary buffer."
(interactive)
(when (rmail-expunge-confirmed)
(let ((was-deleted (rmail-message-deleted-p rmail-current-message))
(was-swapped (rmail-buffers-swapped-p)))
(rmail-only-expunge t)
+ ;; We always update the summary buffer, so that the contents
+ ;; remain consistent with the rmail buffer.
+ ;; The only difference is, in the dont-show case, we use a
+ ;; cut-down version of rmail-select-summary that does not pop
+ ;; the summary buffer. It's only used by rmail-quit, which is
+ ;; just going to bury any summary immediately after. If we made
+ ;; rmail-quit bury the summary first, dont-show could be removed.
+ ;; But the expunge might not be confirmed...
+ (if (rmail-summary-exists)
(if dont-show
- ;; Do update the summary buffer, if any.
(let ((total rmail-total-messages))
- (when (rmail-summary-exists)
(with-current-buffer rmail-summary-buffer
(let ((rmail-total-messages total))
- (rmail-update-summary)))))
- ;; Update the summary and show it.
- (if (rmail-summary-exists)
- (rmail-select-summary (rmail-update-summary)))
+ (rmail-update-summary))))
+ (rmail-select-summary (rmail-update-summary))))
+ ;; We always show a message, because (rmail-only-expunge t)
+ ;; leaves the rmail buffer unswapped.
;; If we expunged the current message, a new one is current now,
;; so show it. If we weren't showing a message, show it.
(if (or was-deleted (not was-swapped))
(rmail-show-message-1 rmail-current-message)
- ;; Show the same message that was being shown before.
+ ;; We can just show the same message that was being shown before.
(rmail-display-labels)
(rmail-swap-buffers)
- (setq rmail-buffer-swapped t))))))
+ (setq rmail-buffer-swapped t)))))
;;;; *** Rmail Mailing Commands ***
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp ChangeLog mail/rmail.el,
Glenn Morris <=