comparison lisp/doc-view.el @ 87572:0e44918a91f4

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.
author Tassilo Horn <tassilo@member.fsf.org>
date Fri, 04 Jan 2008 08:27:20 +0000
parents 39204305bf6f
children f637e8101ba1
comparison
equal deleted inserted replaced
87571:65113c11c1c5 87572:0e44918a91f4
375 (doc-view-goto-page (length doc-view-current-files))) 375 (doc-view-goto-page (length doc-view-current-files)))
376 376
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
394 (defun doc-view-kill-proc () 393 (defun doc-view-kill-proc ()
395 "Kill the current converter process." 394 "Kill the current converter process."