X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/262d5ce7c21d6c1136fd2b8df67736e41e8e8953..0d46b5f12c2e87c1fb2d5f103f2012c2f03a7ba9:/lisp/scroll-lock.el diff --git a/lisp/scroll-lock.el b/lisp/scroll-lock.el index 5896d6478e..bdae2e5a2d 100644 --- a/lisp/scroll-lock.el +++ b/lisp/scroll-lock.el @@ -1,17 +1,17 @@ ;;; scroll-lock.el --- Scroll lock scrolling. -;; Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 2005-2014 Free Software Foundation, Inc. ;; Author: Ralf Angeli -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org ;; Created: 2005-06-18 ;; 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 . ;;; Commentary: @@ -51,10 +49,12 @@ ;;;###autoload (define-minor-mode scroll-lock-mode "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 -during scrolling." +With a prefix argument ARG, enable the mode if ARG is positive, +and disable it otherwise. If called from Lisp, enable the mode +if ARG is omitted or nil. When enabled, keys that 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 during scrolling." :lighter " ScrLck" :keymap scroll-lock-mode-map (if scroll-lock-mode @@ -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) @@ -125,5 +125,4 @@ during scrolling." (provide 'scroll-lock) -;; arch-tag: 148fc8e8-67e0-4638-bb34-3291595ab7e1 ;;; scroll-lock.el ends here