[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp/mail pmailsum.el
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/lisp/mail pmailsum.el |
Date: |
Tue, 02 Dec 2008 22:57:03 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 08/12/02 22:57:03
Modified files:
lisp/mail : pmailsum.el
Log message:
(pmail-new-summary): Check for pmail-summary-mode in the current
buffer, not in the pmail buffer.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/pmailsum.el?cvsroot=emacs&r1=1.8&r2=1.9
Patches:
Index: pmailsum.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mail/pmailsum.el,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- pmailsum.el 2 Dec 2008 14:03:27 -0000 1.8
+++ pmailsum.el 2 Dec 2008 22:57:02 -0000 1.9
@@ -77,7 +77,9 @@
(defun pmail-summary ()
"Display a summary of all messages, one line per message."
(interactive)
- (pmail-new-summary "All" '(pmail-summary) nil))
+ (pmail-new-summary "All" '(pmail-summary) nil)
+ (unless (get-buffer-window pmail-buffer)
+ (pmail-summary-beginning-of-message)))
;;;###autoload
(defun pmail-summary-by-labels (labels)
@@ -193,17 +195,19 @@
and if the result is non-nil, that message is included.
nil for FUNCTION means all messages."
(message "Computing summary lines...")
+ (unless pmail-buffer
+ (error "No PMAIL buffer found"))
(let (mesg was-in-summary)
- (with-current-buffer pmail-buffer
(if (eq major-mode 'pmail-summary-mode)
(setq was-in-summary t))
+ (with-current-buffer pmail-buffer
(setq mesg pmail-current-message
pmail-summary-buffer (pmail-new-summary-1 desc redo func args)))
;; Now display the summary buffer and go to the right place in it.
- (or was-in-summary
- (progn
+ (unless was-in-summary
(if (and (one-window-p)
- pop-up-windows (not pop-up-frames))
+ pop-up-windows
+ (not pop-up-frames))
;; If there is just one window, put the summary on the top.
(progn
(split-window (selected-window) pmail-summary-window-size)
@@ -211,14 +215,15 @@
(pop-to-buffer pmail-summary-buffer)
;; If pop-to-buffer did not use that window, delete that
;; window. (This can happen if it uses another frame.)
- (if (not (eq pmail-summary-buffer (window-buffer
(frame-first-window))))
+ (if (not (eq pmail-summary-buffer
+ (window-buffer (frame-first-window))))
(delete-other-windows)))
(pop-to-buffer pmail-summary-buffer))
(set-buffer pmail-buffer)
;; This is how pmail makes the summary buffer reappear.
;; We do this here to make the window the proper size.
(pmail-select-summary nil)
- (set-buffer pmail-summary-buffer)))
+ (set-buffer pmail-summary-buffer))
(pmail-summary-goto-msg mesg t t)
(pmail-summary-construct-io-menu)
(message "Computing summary lines...done")))