[Top][All Lists]

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

Re: Doc View Page Problems

From: Ian D
Subject: Re: Doc View Page Problems
Date: Wed, 16 Apr 2014 15:27:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>         Since image-mode sets up the `t' entry itself, it could be
>>         possible to continuously update this every time another entry is
>>         updated, if that's what you're suggesting.
> Yes, that's what I'm suggesting.
        Alright.  I've got the full patch, and updated ChangeLog entry.

Ian D

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 4254485..4ff78b5 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 de6bb85..98fc385 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)))))
2014-04-16 Ian Dunn <address@hidden>

        * doc-view.el (doc-vew-new-window-function): If no window
          exists, move to the last known page.
        * image-mode.el (image-mode-window-put): Updates the default

reply via email to

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