]> code.delx.au - gnu-emacs/blobdiff - lisp/scroll-lock.el
(vc-hooks, ewoc): Require.
[gnu-emacs] / lisp / scroll-lock.el
index 7b2beb54b85370318b8ffb3838eef92045661ae4..7dbcb17a897ec4b3c711b9e18280769202bb7869 100644 (file)
@@ -1,6 +1,6 @@
 ;;; scroll-lock.el --- Scroll lock scrolling.
 
-;; Copyright (C) 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Ralf Angeli <angeli@iwi.uni-sb.de>
 ;; Maintainer: FSF
@@ -8,10 +8,10 @@
 
 ;; 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 2, 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
@@ -19,9 +19,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with this program; 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:
 
   (let ((map (make-sparse-keymap)))
     (define-key map [remap next-line] 'scroll-lock-next-line)
     (define-key map [remap previous-line] 'scroll-lock-previous-line)
-    (define-key map [remap forward-paragraph] 'scroll-lock-forward-paragrap=
-h)
-    (define-key map [remap backward-paragraph] 'scroll-lock-backward-paragr=
-aph)
+    (define-key map [remap forward-paragraph] 'scroll-lock-forward-paragraph)
+    (define-key map [remap backward-paragraph] 'scroll-lock-backward-paragraph)
     map)
   "Keymap for Scroll Lock mode.")
 
@@ -52,7 +48,7 @@ aph)
 
 ;;;###autoload
 (define-minor-mode scroll-lock-mode
-  "Minor mode for pager-like scrolling.
+  "Buffer-local minor mode for pager-like scrolling.
 Keys which normally move point by line or paragraph will scroll
 the buffer by the respective amount of lines instead and point
 will be kept vertically fixed relative to window boundaries
@@ -90,7 +86,7 @@ during scrolling."
   (or arg (setq arg 1))
   (scroll-lock-update-goal-column)
   (if (pos-visible-in-window-p (point-max))
-      (next-line arg)
+      (forward-line arg)
     (scroll-up arg))
   (scroll-lock-move-to-column scroll-lock-temporary-goal-column))
 
@@ -101,7 +97,7 @@ during scrolling."
   (scroll-lock-update-goal-column)
   (condition-case nil
       (scroll-down arg)
-    (beginning-of-buffer (previous-line arg)))
+    (beginning-of-buffer (forward-line (- arg))))
   (scroll-lock-move-to-column scroll-lock-temporary-goal-column))
 
 (defun scroll-lock-forward-paragraph (&optional arg)
@@ -127,4 +123,5 @@ during scrolling."
 
 (provide 'scroll-lock)
 
+;; arch-tag: 148fc8e8-67e0-4638-bb34-3291595ab7e1
 ;;; scroll-lock.el ends here