# HG changeset patch # User Gerd Moellmann # Date 959712308 0 # Node ID aec01f0c672983ccc911f772754f8e292929c97d # Parent 505deeadeb1f8c248ce81424233bcdbe1610e242 (rmail-widen-to-current-msgbeg): Use rmail-msgbeg and rmail-msgend to compute the restriction at the end, instead of computing it. diff -r 505deeadeb1f -r aec01f0c6729 lisp/mail/rmail.el --- a/lisp/mail/rmail.el Tue May 30 18:43:56 2000 +0000 +++ b/lisp/mail/rmail.el Tue May 30 18:45:08 2000 +0000 @@ -2038,19 +2038,17 @@ FUNCTION may not change the visible text of the message, but it may change the invisible header text." (save-excursion - (let ((obeg (- (point-max) (point-min)))) - (unwind-protect - (progn - (narrow-to-region (rmail-msgbeg rmail-current-message) - (point-max)) - (goto-char (point-min)) - (funcall function)) + (unwind-protect + (progn + (narrow-to-region (rmail-msgbeg rmail-current-message) + (point-max)) + (goto-char (point-min)) + (funcall function)) ;; Note: we don't use save-restriction because that does not work right ;; if changes are made outside the saved restriction ;; before that restriction is restored. - ;; Here we assume that changes made by FUNCTION - ;; occur before the visible region of the message. - (narrow-to-region (- (point-max) obeg) (point-max)))))) + (narrow-to-region (rmail-msgbeg rmail-current-message) + (rmail-msgend rmail-current-message))))) (defun rmail-forget-messages () (unwind-protect