aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMartin Rudalics2008-10-28 17:36:34 +0000
committerMartin Rudalics2008-10-28 17:36:34 +0000
commit99dfcc0d5280940b5e210b910e4146d1c7f1ad29 (patch)
tree4a991869371a00b9654614546cc079e7d352bec3 /lisp
parent4ab2b63c9946148b93555f709dff844b37251384 (diff)
downloademacs-99dfcc0d5280940b5e210b910e4146d1c7f1ad29.tar.gz
emacs-99dfcc0d5280940b5e210b910e4146d1c7f1ad29.zip
(follow-scroll-down, follow-calc-win-end)
(follow-estimate-first-window-start): Reduce effective window height when header line is present.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/follow.el12
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e25b2016698..aa2c4180ff3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12008-10-28 Phil Sung <psung@mit.edu> (tiny change)
2
3 * follow.el (follow-scroll-down, follow-calc-win-end)
4 (follow-estimate-first-window-start): Reduce effective window
5 height when header line is present.
6
12008-10-28 Juanma Barranquero <lekktu@gmail.com> 72008-10-28 Juanma Barranquero <lekktu@gmail.com>
2 8
3 * subr.el (locate-user-emacs-file): Simplify. Don't create 9 * subr.el (locate-user-emacs-file): Simplify. Don't create
diff --git a/lisp/follow.el b/lisp/follow.el
index 508d0f539ee..61ede230be1 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -624,7 +624,7 @@ Works like `scroll-up' when not in Follow mode."
624 (select-window win) 624 (select-window win)
625 (goto-char start) 625 (goto-char start)
626 (vertical-motion (- (- (window-height win) 626 (vertical-motion (- (- (window-height win)
627 1 627 (if header-line-format 2 1)
628 next-screen-context-lines))) 628 next-screen-context-lines)))
629 (set-window-start win (point)) 629 (set-window-start win (point))
630 (goto-char start) 630 (goto-char start)
@@ -887,7 +887,9 @@ Returns (end-pos end-of-buffer-p)"
887 (prog1 887 (prog1
888 (save-excursion 888 (save-excursion
889 (goto-char (window-start)) 889 (goto-char (window-start))
890 (setq height (- (window-height) 1)) 890 (setq height
891 (- (window-height)
892 (if header-line-format 2 1)))
891 (setq buffer-end-p 893 (setq buffer-end-p
892 (if (bolp) 894 (if (bolp)
893 (not (= height (vertical-motion height))) 895 (not (= height (vertical-motion height)))
@@ -1219,7 +1221,9 @@ position of the first window. Otherwise it is a good guess."
1219 ;(setq exact (bolp)) 1221 ;(setq exact (bolp))
1220 (vertical-motion 0 win) 1222 (vertical-motion 0 win)
1221 (while pred 1223 (while pred
1222 (vertical-motion (- 1 (window-height (car pred))) (car pred)) 1224 (vertical-motion
1225 (- (if header-line-format 2 1)
1226 (window-height (car pred))) (car pred))
1223 (if (not (bolp)) 1227 (if (not (bolp))
1224 (setq exact nil)) 1228 (setq exact nil))
1225 (setq pred (cdr pred))) 1229 (setq pred (cdr pred)))
@@ -1353,7 +1357,7 @@ non-first windows in Follow mode."
1353;; the screen if it should be unaligned. 1357;; the screen if it should be unaligned.
1354;; 1358;;
1355;; We divide the check into two parts; whether we are at the end or not. 1359;; We divide the check into two parts; whether we are at the end or not.
1356;; This is due to the fact that the end can actaually be visible 1360;; This is due to the fact that the end can actually be visible
1357;; in several window even though they are aligned. 1361;; in several window even though they are aligned.
1358 1362
1359(defun follow-post-command-hook () 1363(defun follow-post-command-hook ()