diff options
author | Richard M. Stallman <rms@gnu.org> | 2008-12-23 03:50:17 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2008-12-23 03:50:17 +0000 |
commit | 43d712632d53426a950eed7fd823f16de1aab82c (patch) | |
tree | 984e2bb9803331521481b2deea6116b1b0a492ab /lisp/mail | |
parent | 4d1388b457d814fb6b314ca351c3a2193d9a6d7b (diff) | |
download | emacs-43d712632d53426a950eed7fd823f16de1aab82c.tar.gz |
(pmail-message-subject-p): Mark as broken.
(pmail-message-senders-p): Likewise.
(pmail-new-summary-1): Don't unswap -- search messages where they are.
Diffstat (limited to 'lisp/mail')
-rw-r--r-- | lisp/mail/pmailsum.el | 62 |
1 files changed, 40 insertions, 22 deletions
diff --git a/lisp/mail/pmailsum.el b/lisp/mail/pmailsum.el index eaf3975d9a4..9fcfae0673c 100644 --- a/lisp/mail/pmailsum.el +++ b/lisp/mail/pmailsum.el @@ -148,6 +148,8 @@ SUBJECT is a string of regexps separated by commas." (mail-comma-list-regexp subject) whole-message)) (defun pmail-message-subject-p (msg subject &optional whole-message) + ;;;??? BROKEN + (error "pmail-message-subject-p has not been updated for Pmail") (save-restriction (goto-char (pmail-msgbeg msg)) (search-forward "\n*** EOOH ***\n" (pmail-msgend msg) 'move) @@ -173,6 +175,8 @@ SENDERS is a string of names separated by commas." (mail-comma-list-regexp senders))) (defun pmail-message-senders-p (msg senders) + ;;;??? BROKEN + (error "pmail-message-senders-p has not been updated for Pmail") (save-restriction (goto-char (pmail-msgbeg msg)) (search-forward "\n*** EOOH ***\n") @@ -240,29 +244,39 @@ message." (let ((summary-msgs ()) (pmail-new-summary-line-count 0) (sumbuf (pmail-get-create-summary-buffer))) - (let ((swap (pmail-use-collection-buffer)) - (msgnum 1) - (buffer-read-only nil) - (old-min (point-min-marker)) - (old-max (point-max-marker))) - ;; Can't use save-restriction here; that doesn't work if we - ;; plan to modify text outside the original restriction. + ;; Scan the messages, getting their summary strings + ;; and putting the list of them in SUMMARY-MSGS. + (let ((msgnum 1) + (total pmail-total-messages) + (inhibit-read-only t)) (save-excursion - (widen) - (goto-char (point-min)) - (while (>= pmail-total-messages msgnum) - (if (or (null function) - (apply function (cons msgnum args))) - (setq summary-msgs - (cons (cons msgnum (pmail-get-summary msgnum)) - summary-msgs))) - (setq msgnum (1+ msgnum)) - ;; Provide a periodic User progress message. - (if (zerop (% pmail-new-summary-line-count 10)) - (message "Computing summary lines...%d" - pmail-new-summary-line-count))) - (setq summary-msgs (nreverse summary-msgs))) - (narrow-to-region old-min old-max)) + (if (pmail-buffers-swapped-p) + (set-buffer pmail-view-buffer)) + (let ((old-min (point-min-marker)) + (old-max (point-max-marker))) + (unwind-protect + ;; Can't use save-restriction here; that doesn't work if we + ;; plan to modify text outside the original restriction. + (save-excursion + (widen) + (goto-char (point-min)) + (while (>= total msgnum) + ;; First test whether to include this message. + (if (or (null function) + (apply function (cons msgnum args))) + (setq summary-msgs + ;; Go back to the Pmail buffer so + ;; so pmail-get-summary can see its local vars. + (with-current-buffer pmail-buffer + (cons (cons msgnum (pmail-get-summary msgnum)) + summary-msgs)))) + (setq msgnum (1+ msgnum)) + ;; Provide a periodic User progress message. + (if (zerop (% pmail-new-summary-line-count 10)) + (message "Computing summary lines...%d" + pmail-new-summary-line-count))) + (setq summary-msgs (nreverse summary-msgs))) + (narrow-to-region old-min old-max))))) ;; Temporarily, while summary buffer is unfinished, ;; we "don't have" a summary. @@ -1723,5 +1737,9 @@ KEYWORDS is a comma-separated list of labels." (provide 'pmailsum) +;; Local Variables: +;; change-log-default-name: "ChangeLog.pmail" +;; End: + ;; arch-tag: 80b0a27a-a50d-4f37-9466-83d32d1e0ca8 ;;; pmailsum.el ends here |