diff options
| author | Richard M. Stallman | 2002-02-06 15:00:31 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-02-06 15:00:31 +0000 |
| commit | 9d43f6f103578fb139ce17ddac5f2c087d03baa7 (patch) | |
| tree | 0c18de345ef586048e8a953aa32b14a3f9e5b423 | |
| parent | 4103b3373e3eb66eb28abe8f1fc01c7c965fe82f (diff) | |
| download | emacs-9d43f6f103578fb139ce17ddac5f2c087d03baa7.tar.gz emacs-9d43f6f103578fb139ce17ddac5f2c087d03baa7.zip | |
(rmail-toggle-header): Avoid possibly slow call to
rmail-count-screen-lines starting from (point-min).
| -rw-r--r-- | lisp/mail/rmail.el | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 4d3d39d0f0d..2040fa2dad1 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -2058,12 +2058,7 @@ otherwise, show it in full." | |||
| 2058 | (recenter old-screen-line) | 2058 | (recenter old-screen-line) |
| 2059 | (if (and all-headers-visible | 2059 | (if (and all-headers-visible |
| 2060 | (not (= (window-start) (point-min)))) | 2060 | (not (= (window-start) (point-min)))) |
| 2061 | (let ((lines-offscreen (rmail-count-screen-lines | 2061 | (recenter (- (window-height) 2)))))))) |
| 2062 | (point-min) | ||
| 2063 | (window-start window)))) | ||
| 2064 | (recenter (min (+ old-screen-line lines-offscreen) | ||
| 2065 | ;; last line of window | ||
| 2066 | (- (window-height) 2)))))))))) | ||
| 2067 | (rmail-highlight-headers)))) | 2062 | (rmail-highlight-headers)))) |
| 2068 | 2063 | ||
| 2069 | (defun rmail-narrow-to-non-pruned-header () | 2064 | (defun rmail-narrow-to-non-pruned-header () |