diff options
| author | Tassilo Horn | 2008-01-04 13:21:42 +0000 |
|---|---|---|
| committer | Tassilo Horn | 2008-01-04 13:21:42 +0000 |
| commit | bcc758eca97781b4849e0ce4bfe8a0589ece0ea3 (patch) | |
| tree | 235ee4b5534f95598969031f1ceb78ef9bbce7a6 | |
| parent | c2699583bebb76b73645cb49c75bfc5132442955 (diff) | |
| download | emacs-bcc758eca97781b4849e0ce4bfe8a0589ece0ea3.tar.gz emacs-bcc758eca97781b4849e0ce4bfe8a0589ece0ea3.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): Don't scroll to the
top/bottom again when on the first/last page.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/doc-view.el | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fad86b2b545..becb813171b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 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): Don't scroll to the | ||
| 5 | top/bottom again when on the first/last page. | ||
| 6 | |||
| 1 | 2008-01-04 Juanma Barranquero <lekktu@gmail.com> | 7 | 2008-01-04 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 8 | ||
| 3 | * bs.el (bs--get-mode-name): Fix typo in previous change. | 9 | * bs.el (bs--get-mode-name): Fix typo in previous change. |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 2f1d9f53783..9c153dc584f 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -380,15 +380,19 @@ has finished." | |||
| 380 | "Scroll page up if possible, else goto next page." | 380 | "Scroll page up if possible, else goto next page." |
| 381 | (interactive) | 381 | (interactive) |
| 382 | (when (= (window-vscroll) (image-scroll-up nil)) | 382 | (when (= (window-vscroll) (image-scroll-up nil)) |
| 383 | (doc-view-next-page) | 383 | (let ((cur-page doc-view-current-page)) |
| 384 | (set-window-vscroll nil 0))) | 384 | (doc-view-next-page) |
| 385 | (when (/= cur-page doc-view-current-page) | ||
| 386 | (set-window-vscroll nil 0))))) | ||
| 385 | 387 | ||
| 386 | (defun doc-view-scroll-down-or-previous-page () | 388 | (defun doc-view-scroll-down-or-previous-page () |
| 387 | "Scroll page down if possible, else goto previous page." | 389 | "Scroll page down if possible, else goto previous page." |
| 388 | (interactive) | 390 | (interactive) |
| 389 | (when (= (window-vscroll) (image-scroll-down nil)) | 391 | (when (= (window-vscroll) (image-scroll-down nil)) |
| 390 | (doc-view-previous-page) | 392 | (let ((cur-page doc-view-current-page)) |
| 391 | (image-scroll-up nil))) | 393 | (doc-view-previous-page) |
| 394 | (when (/= cur-page doc-view-current-page) | ||
| 395 | (image-scroll-up nil))))) | ||
| 392 | 396 | ||
| 393 | ;;;; Utility Functions | 397 | ;;;; Utility Functions |
| 394 | 398 | ||