]> git.eshelyaron.com Git - emacs.git/commitdiff
(doc-view-goto-page): Don't move point any more, now that
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 19 Jan 2008 05:34:29 +0000 (05:34 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 19 Jan 2008 05:34:29 +0000 (05:34 +0000)
the hscroll behavior was fixed.
(doc-view-mode): Disable auto-hscroll-mode.

lisp/ChangeLog
lisp/doc-view.el

index 4f1526e0bc3163da6ae355991503799a44befd5a..b3f873c73e30010a961c58d1b5e40cd5da1463e7 100644 (file)
@@ -1,6 +1,12 @@
+2008-01-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * doc-view.el (doc-view-goto-page): Don't move point any more, now that
+       the hscroll behavior was fixed.
+       (doc-view-mode): Disable auto-hscroll-mode.
+
 2008-01-18  Tom Tromey  <tromey@redhat.com>
 
-        * vc-svn.el (vc-svn-dir-status): New function.
+       * vc-svn.el (vc-svn-dir-status): New function.
 
 2008-01-18  Dan Nicolaescu  <dann@ics.uci.edu>
 
index ba4aadb1e6b312671846c072f91f134a48a2ccec..034eace3dfbf6fa3e6c37f3998c1d43881f611bd 100644 (file)
@@ -99,6 +99,7 @@
 
 ;;; Todo:
 
+;; - share more code with image-mode again.
 ;; - better menu.
 ;; - Bind slicing to a drag event.
 ;; - doc-view-fit-doc-to-window and doc-view-fit-window-to-doc.
@@ -356,12 +357,7 @@ the (uncompressed, extracted) file residing in
     ;; Update the buffer
     (doc-view-insert-image (nth (1- page) doc-view-current-files)
                            :pointer 'arrow)
-    (overlay-put doc-view-current-overlay 'help-echo doc-view-current-info)
-    (goto-char (point-min))
-    ;; This seems to be needed for set-window-hscroll (in
-    ;; image-forward-hscroll) to do something useful, I don't have time to
-    ;; debug this now.  :-(  --Stef
-    (forward-char)))
+    (overlay-put doc-view-current-overlay 'help-echo doc-view-current-info)))
 
 (defun doc-view-next-page (&optional arg)
   "Browse ARG pages forward."
@@ -994,6 +990,8 @@ toggle between displaying the document or editing it as text."
   (set (make-local-variable 'mode-line-position)
        '(" P" (:eval (number-to-string doc-view-current-page))
         "/" (:eval (number-to-string (length doc-view-current-files)))))
+  ;; Don't scroll unless the user specifically asked for it.
+  (set (make-local-variable 'auto-hscroll-mode) nil)
   (set (make-local-variable 'cursor-type) nil)
   (use-local-map doc-view-mode-map)
   (set (make-local-variable 'after-revert-hook) 'doc-view-reconvert-doc)