aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJuri Linkov2010-04-16 02:51:12 +0300
committerJuri Linkov2010-04-16 02:51:12 +0300
commita4b000fb3dc67a7eedc388acf47c2002b4918665 (patch)
treecde30031369835c89e5729e877e6a86bf81456af /lisp
parent4874f5e6d6a2d6d121814cb1638d78e5f1cd3b83 (diff)
downloademacs-a4b000fb3dc67a7eedc388acf47c2002b4918665.tar.gz
emacs-a4b000fb3dc67a7eedc388acf47c2002b4918665.zip
Add the `scroll-command' property.
* window.c: Add Qscroll_command. Remove Vscroll_preserve_screen_position_commands. (window_scroll_pixel_based, window_scroll_line_based): Check the `scroll-command' property on the last command instead of searching the last command in Vscroll_preserve_screen_position_commands. (syms_of_window): Initialize and staticpro `Qscroll_command'. Put Qscroll_command property on Qscroll_up and Qscroll_down. (scroll-preserve-screen-position): Doc fix. (Vscroll_preserve_screen_position_commands): Remove variable. * simple.el (scroll-up-command, scroll-down-command) (scroll-up-line, scroll-down-line): Put `scroll-command' property on the these symbols. Remove them from `scroll-preserve-screen-position-commands'. * mwheel.el (mwheel-scroll): Put `scroll-command' and `isearch-scroll' properties on the `mwheel-scroll' symbol. Remove it from `scroll-preserve-screen-position-commands'. * isearch.el (isearch-allow-scroll): Doc fix.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog13
-rw-r--r--lisp/isearch.el2
-rw-r--r--lisp/mwheel.el3
-rw-r--r--lisp/simple.el8
4 files changed, 20 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5ac0723343b..6aeb1b1f1c2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,16 @@
12010-04-15 Juri Linkov <juri@jurta.org>
2
3 * simple.el (scroll-up-command, scroll-down-command)
4 (scroll-up-line, scroll-down-line): Put `scroll-command'
5 property on the these symbols. Remove them from
6 `scroll-preserve-screen-position-commands'.
7
8 * mwheel.el (mwheel-scroll): Put `scroll-command' and
9 `isearch-scroll' properties on the `mwheel-scroll' symbol.
10 Remove it from `scroll-preserve-screen-position-commands'.
11
12 * isearch.el (isearch-allow-scroll): Doc fix.
13
12010-04-15 Michael Albinus <michael.albinus@gmx.de> 142010-04-15 Michael Albinus <michael.albinus@gmx.de>
2 15
3 * net/tramp.el (tramp-error-with-buffer): Don't show the 16 * net/tramp.el (tramp-error-with-buffer): Don't show the
diff --git a/lisp/isearch.el b/lisp/isearch.el
index d0ad330c5c0..3684c8e320a 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1757,7 +1757,7 @@ Scroll-bar or mode-line events are processed appropriately."
1757 "Whether scrolling is allowed during incremental search. 1757 "Whether scrolling is allowed during incremental search.
1758If non-nil, scrolling commands can be used in Isearch mode. 1758If non-nil, scrolling commands can be used in Isearch mode.
1759However, the current match will never scroll offscreen. 1759However, the current match will never scroll offscreen.
1760If nil, scolling commands will first cancel Isearch mode." 1760If nil, scrolling commands will first cancel Isearch mode."
1761 :type 'boolean 1761 :type 'boolean
1762 :group 'isearch) 1762 :group 'isearch)
1763 1763
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index f88b2e86503..224920e515f 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -246,7 +246,8 @@ This should only be bound to mouse buttons 4 and 5."
246 (run-with-timer mouse-wheel-inhibit-click-time nil 246 (run-with-timer mouse-wheel-inhibit-click-time nil
247 'mwheel-inhibit-click-timeout)))) 247 'mwheel-inhibit-click-timeout))))
248 248
249(add-to-list 'scroll-preserve-screen-position-commands 'mwheel-scroll) 249(put 'mwheel-scroll 'scroll-command t)
250(put 'mwheel-scroll 'isearch-scroll t)
250 251
251(defvar mwheel-installed-bindings nil) 252(defvar mwheel-installed-bindings nil)
252 253
diff --git a/lisp/simple.el b/lisp/simple.el
index d071c76e2b1..bb8f1b65651 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4792,8 +4792,8 @@ If ARG is the atom `-', scroll downward by nearly full screen."
4792 ;; move to the bottom of the buffer. 4792 ;; move to the bottom of the buffer.
4793 (goto-char (point-max)))))))) 4793 (goto-char (point-max))))))))
4794 4794
4795(put 'scroll-up-command 'scroll-command t)
4795(put 'scroll-up-command 'isearch-scroll t) 4796(put 'scroll-up-command 'isearch-scroll t)
4796(add-to-list 'scroll-preserve-screen-position-commands 'scroll-up-command)
4797 4797
4798(defun scroll-down-command (&optional arg) 4798(defun scroll-down-command (&optional arg)
4799 "Scroll text of selected window down ARG lines; or near full screen if no ARG. 4799 "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."
4825 ;; move to the top of the buffer. 4825 ;; move to the top of the buffer.
4826 (goto-char (point-min)))))))) 4826 (goto-char (point-min))))))))
4827 4827
4828(put 'scroll-down-command 'scroll-command t)
4828(put 'scroll-down-command 'isearch-scroll t) 4829(put 'scroll-down-command 'isearch-scroll t)
4829(add-to-list 'scroll-preserve-screen-position-commands 'scroll-down-command)
4830 4830
4831;;; Scrolling commands which scroll a line instead of full screen. 4831;;; Scrolling commands which scroll a line instead of full screen.
4832 4832
@@ -4837,8 +4837,8 @@ This is different from `scroll-up-command' that scrolls a full screen."
4837 (interactive "p") 4837 (interactive "p")
4838 (scroll-up (or arg 1))) 4838 (scroll-up (or arg 1)))
4839 4839
4840(put 'scroll-up-line 'scroll-command t)
4840(put 'scroll-up-line 'isearch-scroll t) 4841(put 'scroll-up-line 'isearch-scroll t)
4841(add-to-list 'scroll-preserve-screen-position-commands 'scroll-up-line)
4842 4842
4843(defun scroll-down-line (&optional arg) 4843(defun scroll-down-line (&optional arg)
4844 "Scroll text of selected window down ARG lines; or one line if no ARG. 4844 "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."
4847 (interactive "p") 4847 (interactive "p")
4848 (scroll-down (or arg 1))) 4848 (scroll-down (or arg 1)))
4849 4849
4850(put 'scroll-down-line 'scroll-command t)
4850(put 'scroll-down-line 'isearch-scroll t) 4851(put 'scroll-down-line 'isearch-scroll t)
4851(add-to-list 'scroll-preserve-screen-position-commands 'scroll-down-line)
4852 4852
4853 4853
4854(defun scroll-other-window-down (lines) 4854(defun scroll-other-window-down (lines)