aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-02-07 03:02:57 +0000
committerGlenn Morris2009-02-07 03:02:57 +0000
commit8acdd748848e6648d61ca0b8a65ca572572d3e81 (patch)
tree3600f210cf4845abc86d99d52aae27f6c0f0fac1
parent04ca017c6c119e31d230625ebc6c39e614e1023f (diff)
downloademacs-8acdd748848e6648d61ca0b8a65ca572572d3e81.tar.gz
emacs-8acdd748848e6648d61ca0b8a65ca572572d3e81.zip
(rmail-create-summary-line): Widen the view buffer
before trying to move to the start of the message. (rmail-summary-undelete-many, rmail-summary-rmail-update): Fix rmail-set-attribute calls.
-rw-r--r--lisp/mail/rmailsum.el31
1 files changed, 16 insertions, 15 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 5c250039c30..82dc56ae64f 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -374,21 +374,22 @@ even if its text is swapped."
374 ;; Now we can compute the line count. 374 ;; Now we can compute the line count.
375 (if rmail-summary-line-count-flag 375 (if rmail-summary-line-count-flag
376 (setq lines (count-lines beg end))) 376 (setq lines (count-lines beg end)))
377
378 ;; Narrow to the message header. 377 ;; Narrow to the message header.
379 (save-excursion 378 (save-excursion
380 (goto-char beg) 379 (save-restriction
381 (if (search-forward "\n\n" end t) 380 (widen)
382 (save-restriction 381 (goto-char beg)
383 (narrow-to-region beg (point)) 382 (if (search-forward "\n\n" end t)
384 ;; Replace rmail-message-unseen-p from above. 383 (progn
385 (goto-char beg) 384 (narrow-to-region beg (point))
386 (setq unseen (and (search-forward 385 ;; Replace rmail-message-unseen-p from above.
387 (concat rmail-attribute-header ": ") nil t) 386 (goto-char beg)
388 (looking-at "......U"))) 387 (setq unseen (and (search-forward
389 ;; Generate a status line from the message. 388 (concat rmail-attribute-header ": ") nil t)
390 (rmail-create-summary msgnum deleted unseen lines)) 389 (looking-at "......U")))
391 (rmail-error-bad-format msgnum)))))) 390 ;; Generate a status line from the message.
391 (rmail-create-summary msgnum deleted unseen lines))
392 (rmail-error-bad-format msgnum)))))))
392 393
393;; FIXME this is now unused. 394;; FIXME this is now unused.
394;; The intention was to display in the summary something like {E} 395;; The intention was to display in the summary something like {E}
@@ -810,7 +811,7 @@ Optional prefix ARG means undelete ARG previous messages."
810 (while (and (> rmail-current-message 0) 811 (while (and (> rmail-current-message 0)
811 (< msgs-undeled n)) 812 (< msgs-undeled n))
812 (if (rmail-message-deleted-p rmail-current-message) 813 (if (rmail-message-deleted-p rmail-current-message)
813 (progn (rmail-set-attribute "deleted" nil) 814 (progn (rmail-set-attribute rmail-deleted-attr-index nil)
814 (setq msgs-undeled (1+ msgs-undeled)))) 815 (setq msgs-undeled (1+ msgs-undeled))))
815 (setq rmail-current-message (1- rmail-current-message))) 816 (setq rmail-current-message (1- rmail-current-message)))
816 (set-buffer rmail-summary-buffer) 817 (set-buffer rmail-summary-buffer)
@@ -917,7 +918,7 @@ Search, the `unseen' attribute is restored.")
917 ;; and we have gone to a different message while searching, 918 ;; and we have gone to a different message while searching,
918 ;; put back `unseen' on the former one. 919 ;; put back `unseen' on the former one.
919 (if rmail-summary-put-back-unseen 920 (if rmail-summary-put-back-unseen
920 (rmail-set-attribute "unseen" t 921 (rmail-set-attribute rmail-unseen-attr-index t
921 rmail-current-message)) 922 rmail-current-message))
922 ;; Arrange to do that later, for the new current message, 923 ;; Arrange to do that later, for the new current message,
923 ;; if it still has `unseen'. 924 ;; if it still has `unseen'.