Commit 07ae0d66 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(rmail-widen-to-current-msgbeg): Use rmail-msgbeg

and rmail-msgend to compute the restriction at the end, instead of
computing it.
parent cb6560a1
...@@ -2038,19 +2038,17 @@ again afterward. ...@@ -2038,19 +2038,17 @@ again afterward.
FUNCTION may not change the visible text of the message, but it may FUNCTION may not change the visible text of the message, but it may
change the invisible header text." change the invisible header text."
(save-excursion (save-excursion
(let ((obeg (- (point-max) (point-min)))) (unwind-protect
(unwind-protect (progn
(progn (narrow-to-region (rmail-msgbeg rmail-current-message)
(narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
(point-max)) (goto-char (point-min))
(goto-char (point-min)) (funcall function))
(funcall function))
;; Note: we don't use save-restriction because that does not work right ;; Note: we don't use save-restriction because that does not work right
;; if changes are made outside the saved restriction ;; if changes are made outside the saved restriction
;; before that restriction is restored. ;; before that restriction is restored.
;; Here we assume that changes made by FUNCTION (narrow-to-region (rmail-msgbeg rmail-current-message)
;; occur before the visible region of the message. (rmail-msgend rmail-current-message)))))
(narrow-to-region (- (point-max) obeg) (point-max))))))
(defun rmail-forget-messages () (defun rmail-forget-messages ()
(unwind-protect (unwind-protect
......
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