]> git.eshelyaron.com Git - emacs.git/commitdiff
2008-01-04 Tassilo Horn <tassilo@member.fsf.org>
authorTassilo Horn <tassilo@member.fsf.org>
Fri, 4 Jan 2008 08:27:54 +0000 (08:27 +0000)
committerTassilo Horn <tassilo@member.fsf.org>
Fri, 4 Jan 2008 08:27:54 +0000 (08:27 +0000)
* 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.

lisp/ChangeLog
lisp/doc-view.el

index de06c6484431ff308359947977525fb31177a60d..a70217127103afba360f99817a991146a9e29d00 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 2008-01-04  Rob Riepel  <riepel@networking.Stanford.EDU>
 
        * emulation/tpu-edt.el (tpu-load-xkeys): Recommend to run the
index b63d86afb01836ea8830aef4b88a2a5e3525a345..c47e98fe36867454d236af34963dec2f34096f72 100644 (file)
@@ -377,17 +377,16 @@ has finished."
 (defun doc-view-scroll-up-or-next-page ()
   "Scroll page up if possible, else goto next page."
   (interactive)
-  (condition-case nil
-      (scroll-up)
-    (error (doc-view-next-page))))
+  (when (= (window-vscroll) (image-scroll-up nil))
+    (doc-view-next-page)
+    (set-window-vscroll nil 0)))
 
 (defun doc-view-scroll-down-or-previous-page ()
   "Scroll page down if possible, else goto previous page."
   (interactive)
-  (condition-case nil
-      (scroll-down)
-    (error (doc-view-previous-page)
-          (goto-char (point-max)))))
+  (when (= (window-vscroll) (image-scroll-down nil))
+    (doc-view-previous-page)
+    (image-scroll-up nil)))
 
 ;;;; Utility Functions