diff options
| author | Tassilo Horn | 2008-01-04 08:27:54 +0000 |
|---|---|---|
| committer | Tassilo Horn | 2008-01-04 08:27:54 +0000 |
| commit | 896631767cce684848ebcbe72ddafdbab56d2201 (patch) | |
| tree | 53c773d5fef049b4c464574263414c169e54999f | |
| parent | db7552d5751acbf9f01648a8a80cc54ed6d598c1 (diff) | |
| download | emacs-896631767cce684848ebcbe72ddafdbab56d2201.tar.gz emacs-896631767cce684848ebcbe72ddafdbab56d2201.zip | |
2008-01-04 Tassilo Horn <tassilo@member.fsf.org>
* doc-view.el (doc-view-scroll-up-or-next-page)
(doc-view-scroll-down-or-previous-page): Use image-scroll-up and
image-scroll-down instead of the non-image equivalents. Don't
rely on a signalled condition but switch pages when scrolling
doesn't change the vertical position anymore.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/doc-view.el | 13 |
2 files changed, 14 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index de06c648443..a7021712710 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2008-01-04 Tassilo Horn <tassilo@member.fsf.org> | ||
| 2 | |||
| 3 | * doc-view.el (doc-view-scroll-up-or-next-page) | ||
| 4 | (doc-view-scroll-down-or-previous-page): Use image-scroll-up and | ||
| 5 | image-scroll-down instead of the non-image equivalents. Don't | ||
| 6 | rely on a signalled condition but switch pages when scrolling | ||
| 7 | doesn't change the vertical position anymore. | ||
| 8 | |||
| 1 | 2008-01-04 Rob Riepel <riepel@networking.Stanford.EDU> | 9 | 2008-01-04 Rob Riepel <riepel@networking.Stanford.EDU> |
| 2 | 10 | ||
| 3 | * emulation/tpu-edt.el (tpu-load-xkeys): Recommend to run the | 11 | * emulation/tpu-edt.el (tpu-load-xkeys): Recommend to run the |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index b63d86afb01..c47e98fe368 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -377,17 +377,16 @@ has finished." | |||
| 377 | (defun doc-view-scroll-up-or-next-page () | 377 | (defun doc-view-scroll-up-or-next-page () |
| 378 | "Scroll page up if possible, else goto next page." | 378 | "Scroll page up if possible, else goto next page." |
| 379 | (interactive) | 379 | (interactive) |
| 380 | (condition-case nil | 380 | (when (= (window-vscroll) (image-scroll-up nil)) |
| 381 | (scroll-up) | 381 | (doc-view-next-page) |
| 382 | (error (doc-view-next-page)))) | 382 | (set-window-vscroll nil 0))) |
| 383 | 383 | ||
| 384 | (defun doc-view-scroll-down-or-previous-page () | 384 | (defun doc-view-scroll-down-or-previous-page () |
| 385 | "Scroll page down if possible, else goto previous page." | 385 | "Scroll page down if possible, else goto previous page." |
| 386 | (interactive) | 386 | (interactive) |
| 387 | (condition-case nil | 387 | (when (= (window-vscroll) (image-scroll-down nil)) |
| 388 | (scroll-down) | 388 | (doc-view-previous-page) |
| 389 | (error (doc-view-previous-page) | 389 | (image-scroll-up nil))) |
| 390 | (goto-char (point-max))))) | ||
| 391 | 390 | ||
| 392 | ;;;; Utility Functions | 391 | ;;;; Utility Functions |
| 393 | 392 | ||