From 07ae0d6685270cd30c9365bb2d42d4026d0d8096 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 30 May 2000 18:45:08 +0000 Subject: [PATCH] (rmail-widen-to-current-msgbeg): Use rmail-msgbeg and rmail-msgend to compute the restriction at the end, instead of computing it. --- lisp/mail/rmail.el | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 4da590d88c8..55000d11269 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2038,19 +2038,17 @@ again afterward. 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 -- 2.39.5