summaryrefslogtreecommitdiff
path: root/lisp/mail/rmailsum.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2009-02-07 03:02:57 +0000
committerGlenn Morris <rgm@gnu.org>2009-02-07 03:02:57 +0000
commitfcc35a5363c9b0c0bf71827d949c35a8a0d012e1 (patch)
tree03538a7f43307bbca16db02fa715ff2f89b27183 /lisp/mail/rmailsum.el
parent4d58c6edeef4d66f83dde9e3851c55915a2b10dd (diff)
downloademacs-fcc35a5363c9b0c0bf71827d949c35a8a0d012e1.tar.gz
(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.
Diffstat (limited to 'lisp/mail/rmailsum.el')
-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."
;; Now we can compute the line count.
(if rmail-summary-line-count-flag
(setq lines (count-lines beg end)))
-
;; Narrow to the message header.
(save-excursion
- (goto-char beg)
- (if (search-forward "\n\n" end t)
- (save-restriction
- (narrow-to-region beg (point))
- ;; Replace rmail-message-unseen-p from above.
- (goto-char beg)
- (setq unseen (and (search-forward
- (concat rmail-attribute-header ": ") nil t)
- (looking-at "......U")))
- ;; Generate a status line from the message.
- (rmail-create-summary msgnum deleted unseen lines))
- (rmail-error-bad-format msgnum))))))
+ (save-restriction
+ (widen)
+ (goto-char beg)
+ (if (search-forward "\n\n" end t)
+ (progn
+ (narrow-to-region beg (point))
+ ;; Replace rmail-message-unseen-p from above.
+ (goto-char beg)
+ (setq unseen (and (search-forward
+ (concat rmail-attribute-header ": ") nil t)
+ (looking-at "......U")))
+ ;; Generate a status line from the message.
+ (rmail-create-summary msgnum deleted unseen lines))
+ (rmail-error-bad-format msgnum)))))))
;; FIXME this is now unused.
;; The intention was to display in the summary something like {E}
@@ -810,7 +811,7 @@ Optional prefix ARG means undelete ARG previous messages."
(while (and (> rmail-current-message 0)
(< msgs-undeled n))
(if (rmail-message-deleted-p rmail-current-message)
- (progn (rmail-set-attribute "deleted" nil)
+ (progn (rmail-set-attribute rmail-deleted-attr-index nil)
(setq msgs-undeled (1+ msgs-undeled))))
(setq rmail-current-message (1- rmail-current-message)))
(set-buffer rmail-summary-buffer)
@@ -917,7 +918,7 @@ Search, the `unseen' attribute is restored.")
;; and we have gone to a different message while searching,
;; put back `unseen' on the former one.
(if rmail-summary-put-back-unseen
- (rmail-set-attribute "unseen" t
+ (rmail-set-attribute rmail-unseen-attr-index t
rmail-current-message))
;; Arrange to do that later, for the new current message,
;; if it still has `unseen'.