]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/image-mode.el (image-mode-window-put): Also update the property of
authorIan D <dunni@gnu.org>
Thu, 17 Apr 2014 03:58:25 +0000 (23:58 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 17 Apr 2014 03:58:25 +0000 (23:58 -0400)
the "default window".
* lisp/doc-view.el (doc-view-new-window-function): If no window
exists, move to the last known page.

lisp/ChangeLog
lisp/doc-view.el
lisp/image-mode.el

index f740e7f23df4449fd3146dcacd4f831ff0e5e2a5..a811b876e3c59792b7320d8d5b43527e01e5d47e 100644 (file)
@@ -1,3 +1,10 @@
+2014-04-17  Ian D  <dunni@gnu.org>  (tiny change)
+
+       * image-mode.el (image-mode-window-put): Also update the property of
+       the "default window".
+       * doc-view.el (doc-view-new-window-function): If no window
+       exists, move to the last known page.
+
 2014-04-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/perl-mode.el (perl-calculate-indent): Don't auto-indent in
index 42544851f6baf80410298ae96fb15c7a608eebf2..4ff78b55d4b38033ec63c68776e60410b2cd0305 100644 (file)
@@ -336,7 +336,7 @@ of the page moves to the previous page."
       ;; Don't do it if there's a conversion is running, since in that case, it
       ;; will be done later.
       (with-selected-window (car winprops)
-        (doc-view-goto-page 1)))))
+        (doc-view-goto-page (image-mode-window-get 'page t))))))
 
 (defvar-local doc-view--current-files nil
   "Only used internally.")
index de6bb85bcb6b8559a25b02950a7d75bcf1fc9584..98fc3857f4146c8b66d2d9800c55c8fed57bdd0a 100644 (file)
@@ -90,6 +90,9 @@ otherwise it defaults to t, used for times when the buffer is not displayed."
 
 (defun image-mode-window-put (prop val &optional winprops)
   (unless (consp winprops) (setq winprops (image-mode-winprops winprops)))
+  (setcdr (assq t image-mode-winprops-alist)
+          (cons (cons prop val)
+                (delq (assq prop (cdr winprops)) (cdr winprops))))
   (setcdr winprops (cons (cons prop val)
                          (delq (assq prop (cdr winprops)) (cdr winprops)))))