emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106363: Rmail summary fixes for empt


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106363: Rmail summary fixes for empty summaries.
Date: Sun, 13 Nov 2011 17:43:50 -0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106363
fixes bug(s): http://debbugs.gnu.org/9964
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sun 2011-11-13 17:43:50 -0800
message:
  Rmail summary fixes for empty summaries.
  
  * lisp/mail/rmailsum.el (rmail-summary, rmail-new-summary)
  (rmail-new-summary-1): Allow empty summaries. 
  (rmail-new-summary): Remember that rmail-summary-buffer is buffer-local.
modified:
  lisp/ChangeLog
  lisp/mail/rmailsum.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-11-12 09:55:50 +0000
+++ b/lisp/ChangeLog    2011-11-14 01:43:50 +0000
@@ -1,3 +1,9 @@
+2011-11-14  Glenn Morris  <address@hidden>
+
+       * mail/rmailsum.el (rmail-summary, rmail-new-summary)
+       (rmail-new-summary-1): Allow empty summaries.  (Bug#9964)
+       (rmail-new-summary): Remember that rmail-summary-buffer is buffer-local.
+
 2011-11-12  Martin Rudalics  <address@hidden>
 
        * window.el (window-resize, delete-window): Use window-splits

=== modified file 'lisp/mail/rmailsum.el'
--- a/lisp/mail/rmailsum.el     2011-02-12 21:45:42 +0000
+++ b/lisp/mail/rmailsum.el     2011-11-14 01:43:50 +0000
@@ -269,7 +269,8 @@
   "Display a summary of all messages, one line per message."
   (interactive)
   (rmail-new-summary "All" '(rmail-summary) nil)
-  (unless (get-buffer-window rmail-buffer)
+  (unless (or (zerop (buffer-size))            ; empty summary
+             (get-buffer-window rmail-buffer))
     (rmail-summary-beginning-of-message)))
 
 ;;;###autoload
@@ -404,13 +405,13 @@
   (message "Computing summary lines...")
   (unless rmail-buffer
     (error "No RMAIL buffer found"))
-  (let (mesg was-in-summary)
+  (let (mesg was-in-summary sumbuf)
     (if (eq major-mode 'rmail-summary-mode)
        (setq was-in-summary t))
     (with-current-buffer rmail-buffer
-      (if (zerop (setq mesg rmail-current-message))
-         (error "No messages to summarize"))
-      (setq rmail-summary-buffer (rmail-new-summary-1 desc redo func args)))
+      (setq rmail-summary-buffer (rmail-new-summary-1 desc redo func args)
+           ;; r-s-b is buffer-local.
+           sumbuf rmail-summary-buffer))
     ;; Now display the summary buffer and go to the right place in it.
     (unless was-in-summary
       (if (and (one-window-p)
@@ -420,13 +421,12 @@
          (progn
            (split-window (selected-window) rmail-summary-window-size)
            (select-window (next-window (frame-first-window)))
-           (rmail-pop-to-buffer rmail-summary-buffer)
+           (rmail-pop-to-buffer sumbuf)
            ;; If pop-to-buffer did not use that window, delete that
            ;; window.  (This can happen if it uses another frame.)
-           (if (not (eq rmail-summary-buffer
-                        (window-buffer (frame-first-window))))
+           (if (not (eq sumbuf (window-buffer (frame-first-window))))
                (delete-other-windows)))
-       (rmail-pop-to-buffer rmail-summary-buffer))
+       (rmail-pop-to-buffer sumbuf))
       (set-buffer rmail-buffer)
       ;; This is how rmail makes the summary buffer reappear.
       ;; We do this here to make the window the proper size.
@@ -490,9 +490,6 @@
     ;; Temporarily, while summary buffer is unfinished,
     ;; we "don't have" a summary.
     (setq rmail-summary-buffer nil)
-    (unless summary-msgs
-      (kill-buffer sumbuf)
-      (error "Nothing to summarize"))
     ;; I have not a clue what this clause is doing.  If you read this
     ;; chunk of code and have a clue, then please email that clue to
     ;; address@hidden


reply via email to

[Prev in Thread] Current Thread [Next in Thread]