aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2006-05-08 15:14:26 +0000
committerStefan Monnier2006-05-08 15:14:26 +0000
commit44a50ffdbfcdade95964f4123e4249c3a8bc9eb2 (patch)
tree6e833bc6b4669e765f8ea2cd92c86f2c714a71dd
parent8c87a72c22623843fea4af61601b7710579c9cc2 (diff)
downloademacs-44a50ffdbfcdade95964f4123e4249c3a8bc9eb2.tar.gz
emacs-44a50ffdbfcdade95964f4123e4249c3a8bc9eb2.zip
(mwheel-scroll): Make sure that when scrolling multiple
pages at a time, if we signal the end, we should indeed reach that end.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/mwheel.el21
2 files changed, 29 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6d386b6b5c6..7437f4aed99 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12006-05-08 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * mwheel.el (mwheel-scroll): Make sure that when scrolling multiple
4 pages at a time, if we signal the end, we should indeed reach that end.
5
62006-05-08 David Reitter <david.reitter@gmail.com>
7
8 * emacs-lisp/easy-mmode.el (define-minor-mode): Only preserve messages
9 output during execution of the body.
10
12006-05-08 Kim F. Storm <storm@cua.dk> 112006-05-08 Kim F. Storm <storm@cua.dk>
2 12
3 * progmodes/grep.el (lgrep, rgrep): Doc fixes. 13 * progmodes/grep.el (lgrep, rgrep): Doc fixes.
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index 662b992b343..b61971c7ea5 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -204,8 +204,25 @@ This should only be bound to mouse buttons 4 and 5."
204 (setq amt (* amt (event-click-count event)))) 204 (setq amt (* amt (event-click-count event))))
205 (unwind-protect 205 (unwind-protect
206 (let ((button (mwheel-event-button event))) 206 (let ((button (mwheel-event-button event)))
207 (cond ((eq button mouse-wheel-down-event) (scroll-down amt)) 207 (cond ((eq button mouse-wheel-down-event)
208 ((eq button mouse-wheel-up-event) (scroll-up amt)) 208 (condition-case nil (scroll-down amt)
209 ;; Make sure we do indeed scroll to the beginning of
210 ;; the buffer.
211 (beginning-of-buffer
212 (unwind-protect
213 (scroll-down)
214 ;; If the first scroll succeeded, then some scrolling
215 ;; is possible: keep scrolling til the beginning but
216 ;; do not signal an error. For some reason, we have
217 ;; to do it even if the first scroll signalled an
218 ;; error, because otherwise the window is recentered
219 ;; for a reason that escapes me. This problem seems
220 ;; to only affect scroll-down. --Stef
221 (set-window-start (selected-window) (point-min))))))
222 ((eq button mouse-wheel-up-event)
223 (condition-case nil (scroll-up amt)
224 ;; Make sure we do indeed scroll to the end of the buffer.
225 (end-of-buffer (while t (scroll-up)))))
209 (t (error "Bad binding in mwheel-scroll")))) 226 (t (error "Bad binding in mwheel-scroll"))))
210 (if curwin (select-window curwin)))) 227 (if curwin (select-window curwin))))
211 (when (and mouse-wheel-click-event mouse-wheel-inhibit-click-time) 228 (when (and mouse-wheel-click-event mouse-wheel-inhibit-click-time)