]> code.delx.au - gnu-emacs/blobdiff - lisp/follow.el
* w32-fns.el (w32-shell-dos-semantics):
[gnu-emacs] / lisp / follow.el
index 16e5309f2ac8fdb0e66a5ac453e6a8a16af887f8..61ede230be121d5ffde31b3678440d43a9a5e845 100644 (file)
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -21,9 +21,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -626,7 +624,7 @@ Works like `scroll-up' when not in Follow mode."
             (select-window win)
             (goto-char start)
             (vertical-motion (- (- (window-height win)
-                                   1
+                                   (if header-line-format 2 1)
                                    next-screen-context-lines)))
             (set-window-start win (point))
             (goto-char start)
@@ -889,7 +887,9 @@ Returns (end-pos end-of-buffer-p)"
       (prog1
          (save-excursion
            (goto-char (window-start))
-           (setq height (- (window-height) 1))
+           (setq height
+                 (- (window-height)
+                    (if header-line-format 2 1)))
            (setq buffer-end-p
                  (if (bolp)
                      (not (= height (vertical-motion height)))
@@ -1221,7 +1221,9 @@ position of the first window.  Otherwise it is a good guess."
       ;(setq exact (bolp))
       (vertical-motion 0 win)
       (while pred
-       (vertical-motion (- 1 (window-height (car pred))) (car pred))
+       (vertical-motion
+        (- (if header-line-format 2 1)
+           (window-height (car pred))) (car pred))
        (if (not (bolp))
          (setq exact nil))
        (setq pred (cdr pred)))
@@ -1355,7 +1357,7 @@ non-first windows in Follow mode."
 ;; the screen if it should be unaligned.
 ;;
 ;; We divide the check into two parts; whether we are at the end or not.
-;; This is due to the fact that the end can actaually be visible
+;; This is due to the fact that the end can actually be visible
 ;; in several window even though they are aligned.
 
 (defun follow-post-command-hook ()