From e51c8d91c2099e993b119447be4f7a859c5bb35e Mon Sep 17 00:00:00 2001 From: Ian D Date: Wed, 16 Apr 2014 23:58:25 -0400 Subject: [PATCH] * lisp/image-mode.el (image-mode-window-put): Also update the property of the "default window". * lisp/doc-view.el (doc-view-new-window-function): If no window exists, move to the last known page. --- lisp/ChangeLog | 7 +++++++ lisp/doc-view.el | 2 +- lisp/image-mode.el | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f740e7f23df..a811b876e3c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2014-04-17 Ian D (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 * progmodes/perl-mode.el (perl-calculate-indent): Don't auto-indent in diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 42544851f6b..4ff78b55d4b 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -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.") diff --git a/lisp/image-mode.el b/lisp/image-mode.el index de6bb85bcb6..98fc3857f41 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -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))))) -- 2.39.5