summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/mwheel.el2
-rw-r--r--lisp/simple.el4
3 files changed, 15 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9a439444831..8baac73bd9a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
+2010-04-14 Juri Linkov <juri@jurta.org>
+
+ * mwheel.el (scroll-preserve-screen-position-commands):
+ Add mwheel-scroll to this list of commands.
+
+ * simple.el (scroll-preserve-screen-position-commands):
+ Add scroll-up-command, scroll-down-command, scroll-up-line,
+ scroll-down-line to this list of commands.
+
2010-04-13 Stefan Monnier <monnier@iro.umontreal.ca>
* obsolete/complete.el: Move from lisp/complete.el.
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index c505833502a..f88b2e86503 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -246,6 +246,8 @@ This should only be bound to mouse buttons 4 and 5."
(run-with-timer mouse-wheel-inhibit-click-time nil
'mwheel-inhibit-click-timeout))))
+(add-to-list 'scroll-preserve-screen-position-commands 'mwheel-scroll)
+
(defvar mwheel-installed-bindings nil)
;; preloaded ;;;###autoload
diff --git a/lisp/simple.el b/lisp/simple.el
index 66ea9ebebd9..60fe6c875d2 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4771,6 +4771,7 @@ If ARG is the atom `-', scroll downward by nearly full screen."
(goto-char (point-max))))))))
(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.
@@ -4799,6 +4800,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
(goto-char (point-min))))))))
(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.
@@ -4810,6 +4812,7 @@ This is different from `scroll-up-command' that scrolls a full screen."
(scroll-up (or arg 1)))
(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.
@@ -4819,6 +4822,7 @@ This is different from `scroll-down-command' that scrolls a full screen."
(scroll-down (or arg 1)))
(put 'scroll-down-line 'isearch-scroll t)
+(add-to-list 'scroll-preserve-screen-position-commands 'scroll-down-line)
(defun scroll-other-window-down (lines)