]> code.delx.au - gnu-emacs/blobdiff - lisp/scroll-lock.el
(sieve-string-bytes): Remove.
[gnu-emacs] / lisp / scroll-lock.el
index e5fca2d1c6e04c806cc98c8218f3734ff2ef6b14..c4656d7a770f34b71d844a18a621d786e1262ca9 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
@@ -10,7 +10,7 @@
 
 ;; 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)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -50,7 +50,7 @@
 
 ;;;###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
@@ -88,7 +88,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))
 
@@ -99,7 +99,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)