Commit 36f41915 authored by Karl Heuer's avatar Karl Heuer

(rmail-new-summary): Avoid unsafe save-restriction.

parent a50d4326
......@@ -156,8 +156,11 @@ nil for FUNCTION means all messages."
(let ((summary-msgs ())
(new-summary-line-count 0))
(let ((msgnum 1)
(buffer-read-only nil))
(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.
(goto-char (point-min))
......@@ -168,7 +171,8 @@ nil for FUNCTION means all messages."
(cons (cons msgnum (rmail-make-summary-line msgnum))
(setq msgnum (1+ msgnum)))
(setq summary-msgs (nreverse summary-msgs)))))
(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.
(setq rmail-summary-buffer nil)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment