emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111890: * lisp/doc-view.el: Preserve


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111890: * lisp/doc-view.el: Preserve h&v scroll across C-c C-c C-c C-c.
Date: Wed, 27 Feb 2013 23:02:36 -0500
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111890
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2013-02-27 23:02:36 -0500
message:
  * lisp/doc-view.el: Preserve h&v scroll across C-c C-c C-c C-c.
  (doc-view-fallback-mode): Remove overlays here.
  (doc-view-toggle-display): Instead of here.  Don't throw away
  image-mode-winprops-alist.
  (doc-view-goto-page): Don't mess with hscroll.
modified:
  lisp/ChangeLog
  lisp/doc-view.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-02-27 15:25:55 +0000
+++ b/lisp/ChangeLog    2013-02-28 04:02:36 +0000
@@ -1,3 +1,11 @@
+2013-02-28  Stefan Monnier  <address@hidden>
+
+       * doc-view.el: Preserve h&v scroll across C-c C-c C-c C-c.
+       (doc-view-fallback-mode): Remove overlays here.
+       (doc-view-toggle-display): Instead of here.  Don't throw away
+       image-mode-winprops-alist.
+       (doc-view-goto-page): Don't mess with hscroll.
+
 2013-02-27  Thierry Volpiatto  <address@hidden>
 
        * font-lock.el (lisp-font-lock-keywords-2): Fix highlighting of

=== modified file 'lisp/doc-view.el'
--- a/lisp/doc-view.el  2013-02-13 08:28:47 +0000
+++ b/lisp/doc-view.el  2013-02-28 04:02:36 +0000
@@ -485,8 +485,7 @@
 (defun doc-view-goto-page (page)
   "View the page given by PAGE."
   (interactive "nPage: ")
-  (let ((len (doc-view-last-page-number))
-       (hscroll (window-hscroll)))
+  (let ((len (doc-view-last-page-number)))
     (if (< page 1)
        (setq page 1)
       (when (and (> page len)
@@ -520,7 +519,6 @@
                  (format doc-view--image-file-pattern page)
                  (doc-view-current-cache-dir))))
       (doc-view-insert-image file :pointer 'arrow)
-      (set-window-hscroll (selected-window) hscroll)
       (when (and (not (file-exists-p file))
                  doc-view-current-converter-processes)
         ;; The PNG file hasn't been generated yet.
@@ -1381,8 +1379,6 @@
       (progn
        (doc-view-kill-proc)
        (setq buffer-read-only nil)
-       (remove-overlays (point-min) (point-max) 'doc-view t)
-       (setq-local image-mode-winprops-alist t)
        ;; Switch to the previously used major mode or fall back to
        ;; normal mode.
        (doc-view-fallback-mode)
@@ -1725,6 +1721,7 @@
                   (mapcar (lambda (var) (cons var (symbol-value var)))
                           '(doc-view-resolution
                             image-mode-winprops-alist)))))
+    (remove-overlays (point-min) (point-max) 'doc-view t)
     (if doc-view-previous-major-mode
         (funcall doc-view-previous-major-mode)
       (let ((auto-mode-alist


reply via email to

[Prev in Thread] Current Thread [Next in Thread]