diff options
| author | Gerd Moellmann | 2000-05-30 18:45:08 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-05-30 18:45:08 +0000 |
| commit | 07ae0d6685270cd30c9365bb2d42d4026d0d8096 (patch) | |
| tree | 92c12d9f6594cadc5fa523d832f7151ffa41a5fd | |
| parent | cb6560a1d1b751324084ad26978207c0642258f6 (diff) | |
| download | emacs-07ae0d6685270cd30c9365bb2d42d4026d0d8096.tar.gz emacs-07ae0d6685270cd30c9365bb2d42d4026d0d8096.zip | |
(rmail-widen-to-current-msgbeg): Use rmail-msgbeg
and rmail-msgend to compute the restriction at the end, instead of
computing it.
| -rw-r--r-- | lisp/mail/rmail.el | 18 |
1 files 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. | |||
| 2038 | FUNCTION may not change the visible text of the message, but it may | 2038 | FUNCTION may not change the visible text of the message, but it may |
| 2039 | change the invisible header text." | 2039 | change the invisible header text." |
| 2040 | (save-excursion | 2040 | (save-excursion |
| 2041 | (let ((obeg (- (point-max) (point-min)))) | 2041 | (unwind-protect |
| 2042 | (unwind-protect | 2042 | (progn |
| 2043 | (progn | 2043 | (narrow-to-region (rmail-msgbeg rmail-current-message) |
| 2044 | (narrow-to-region (rmail-msgbeg rmail-current-message) | 2044 | (point-max)) |
| 2045 | (point-max)) | 2045 | (goto-char (point-min)) |
| 2046 | (goto-char (point-min)) | 2046 | (funcall function)) |
| 2047 | (funcall function)) | ||
| 2048 | ;; Note: we don't use save-restriction because that does not work right | 2047 | ;; Note: we don't use save-restriction because that does not work right |
| 2049 | ;; if changes are made outside the saved restriction | 2048 | ;; if changes are made outside the saved restriction |
| 2050 | ;; before that restriction is restored. | 2049 | ;; before that restriction is restored. |
| 2051 | ;; Here we assume that changes made by FUNCTION | 2050 | (narrow-to-region (rmail-msgbeg rmail-current-message) |
| 2052 | ;; occur before the visible region of the message. | 2051 | (rmail-msgend rmail-current-message))))) |
| 2053 | (narrow-to-region (- (point-max) obeg) (point-max)))))) | ||
| 2054 | 2052 | ||
| 2055 | (defun rmail-forget-messages () | 2053 | (defun rmail-forget-messages () |
| 2056 | (unwind-protect | 2054 | (unwind-protect |