diff options
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/mwheel.el | 21 |
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 @@ | |||
| 1 | 2006-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 | |||
| 6 | 2006-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 | |||
| 1 | 2006-05-08 Kim F. Storm <storm@cua.dk> | 11 | 2006-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) |