changeset 87850:dd673d4bceda

(doc-view-goto-page): Don't move point any more, now that the hscroll behavior was fixed. (doc-view-mode): Disable auto-hscroll-mode.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 19 Jan 2008 05:34:29 +0000
parents 8f7e97005eef
children 6e4b2a69d875
files lisp/ChangeLog lisp/doc-view.el
diffstat 2 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Jan 19 05:27:20 2008 +0000
+++ b/lisp/ChangeLog	Sat Jan 19 05:34:29 2008 +0000
@@ -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>
 
--- a/lisp/doc-view.el	Sat Jan 19 05:27:20 2008 +0000
+++ b/lisp/doc-view.el	Sat Jan 19 05:34:29 2008 +0000
@@ -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 @@
     ;; 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 @@
   (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)