Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
36f41915
Commit
36f41915
authored
Apr 09, 1994
by
Karl Heuer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(rmail-new-summary): Avoid unsafe save-restriction.
parent
a50d4326
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
lisp/mail/rmailsum.el
lisp/mail/rmailsum.el
+17
-13
No files found.
lisp/mail/rmailsum.el
View file @
36f41915
...
@@ -156,19 +156,23 @@ nil for FUNCTION means all messages."
...
@@ -156,19 +156,23 @@ nil for FUNCTION means all messages."
(
let
((
summary-msgs
())
(
let
((
summary-msgs
())
(
new-summary-line-count
0
))
(
new-summary-line-count
0
))
(
let
((
msgnum
1
)
(
let
((
msgnum
1
)
(
buffer-read-only
nil
))
(
buffer-read-only
nil
)
(
save-restriction
(
old-min
(
point-min-marker
))
(
save-excursion
(
old-max
(
point-max-marker
)))
(
widen
)
;; Can't use save-restriction here; that doesn't work if we
(
goto-char
(
point-min
))
;; plan to modify text outside the original restriction.
(
while
(
>=
rmail-total-messages
msgnum
)
(
save-excursion
(
if
(
or
(
null
function
)
(
widen
)
(
apply
function
(
cons
msgnum
args
)))
(
goto-char
(
point-min
))
(
setq
summary-msgs
(
while
(
>=
rmail-total-messages
msgnum
)
(
cons
(
cons
msgnum
(
rmail-make-summary-line
msgnum
))
(
if
(
or
(
null
function
)
summary-msgs
)))
(
apply
function
(
cons
msgnum
args
)))
(
setq
msgnum
(
1+
msgnum
)))
(
setq
summary-msgs
(
setq
summary-msgs
(
nreverse
summary-msgs
)))))
(
cons
(
cons
msgnum
(
rmail-make-summary-line
msgnum
))
summary-msgs
)))
(
setq
msgnum
(
1+
msgnum
)))
(
setq
summary-msgs
(
nreverse
summary-msgs
)))
(
narrow-to-region
old-min
old-max
))
;; Temporarily, while summary buffer is unfinished,
;; Temporarily, while summary buffer is unfinished,
;; we "don't have" a summary.
;; we "don't have" a summary.
(
setq
rmail-summary-buffer
nil
)
(
setq
rmail-summary-buffer
nil
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment