summaryrefslogtreecommitdiff
path: root/lisp/mwheel.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2010-04-14 03:11:21 +0300
committerJuri Linkov <juri@jurta.org>2010-04-14 03:11:21 +0300
commit9013a7f82ede2a309498ae62ac22dce4791b3f4a (patch)
treea2e43ba2c9834b95365810c61cc47c07a87e93d2 /lisp/mwheel.el
parent92848133b2c17d028b2172b6f3ef43e6c1a1370c (diff)
downloademacs-9013a7f82ede2a309498ae62ac22dce4791b3f4a.tar.gz
Add variable `scroll-preserve-screen-position-commands'.
http://lists.gnu.org/archive/html/emacs-devel/2010-04/msg00403.html * window.c (Vscroll_preserve_screen_position_commands): New variable with the default value as the list of Qscroll_down and Qscroll_up. (window_scroll_pixel_based, window_scroll_line_based): Search the last command in the list Vscroll_preserve_screen_position_commands instead of comparing with Qscroll_up and Qscroll_down. * 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.
Diffstat (limited to 'lisp/mwheel.el')
-rw-r--r--lisp/mwheel.el2
1 files changed, 2 insertions, 0 deletions
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