Add the `scroll-command' property.
[bpt/emacs.git] / lisp / simple.el
index d071c76..bb8f1b6 100644 (file)
@@ -4792,8 +4792,8 @@ If ARG is the atom `-', scroll downward by nearly full screen."
         ;; move to the bottom of the buffer.
         (goto-char (point-max))))))))
 
+(put 'scroll-up-command 'scroll-command t)
 (put 'scroll-up-command 'isearch-scroll t)
-(add-to-list 'scroll-preserve-screen-position-commands 'scroll-up-command)
 
 (defun scroll-down-command (&optional arg)
   "Scroll text of selected window down ARG lines; or near full screen if no ARG.
@@ -4825,8 +4825,8 @@ If ARG is the atom `-', scroll upward by nearly full screen."
         ;; move to the top of the buffer.
         (goto-char (point-min))))))))
 
+(put 'scroll-down-command 'scroll-command t)
 (put 'scroll-down-command 'isearch-scroll t)
-(add-to-list 'scroll-preserve-screen-position-commands 'scroll-down-command)
 
 ;;; Scrolling commands which scroll a line instead of full screen.
 
@@ -4837,8 +4837,8 @@ This is different from `scroll-up-command' that scrolls a full screen."
   (interactive "p")
   (scroll-up (or arg 1)))
 
+(put 'scroll-up-line 'scroll-command t)
 (put 'scroll-up-line 'isearch-scroll t)
-(add-to-list 'scroll-preserve-screen-position-commands 'scroll-up-line)
 
 (defun scroll-down-line (&optional arg)
   "Scroll text of selected window down ARG lines; or one line if no ARG.
@@ -4847,8 +4847,8 @@ This is different from `scroll-down-command' that scrolls a full screen."
   (interactive "p")
   (scroll-down (or arg 1)))
 
+(put 'scroll-down-line 'scroll-command t)
 (put 'scroll-down-line 'isearch-scroll t)
-(add-to-list 'scroll-preserve-screen-position-commands 'scroll-down-line)
 
 \f
 (defun scroll-other-window-down (lines)