aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorTassilo Horn2013-03-18 08:41:38 +0100
committerTassilo Horn2013-03-18 08:41:38 +0100
commit2167b7b28faf65ff2c669b6a00734a22eaf12612 (patch)
tree7e18ffc2410a66f4fdb7af530bd3f9d8746f5b79 /lisp
parent6b8504bae0773ffedb64ed2a48cad6f4d84e754d (diff)
downloademacs-2167b7b28faf65ff2c669b6a00734a22eaf12612.tar.gz
emacs-2167b7b28faf65ff2c669b6a00734a22eaf12612.zip
* doc-view.el (doc-view-new-window-function): Check the new window
overlay's display property instead the char property of the buffer's first char. Use `with-selected-window' instead of `save-window-excursion' with `select-window'. (doc-view-document->bitmap): Check the current doc-view overlay's display property instead the char property of the buffer's first char.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/doc-view.el11
2 files changed, 15 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c2fcef66164..082054e5be5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12013-03-18 Tassilo Horn <tsdh@gnu.org>
2
3 * doc-view.el (doc-view-new-window-function): Check the new window
4 overlay's display property instead the char property of the
5 buffer's first char. Use `with-selected-window' instead of
6 `save-window-excursion' with `select-window'.
7 (doc-view-document->bitmap): Check the current doc-view overlay's
8 display property instead the char property of the buffer's first
9 char.
10
12013-03-18 Paul Eggert <eggert@cs.ucla.edu> 112013-03-18 Paul Eggert <eggert@cs.ucla.edu>
2 12
3 Automate the build of ja-dic.el (Bug#13984). 13 Automate the build of ja-dic.el (Bug#13984).
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index ee77f397746..6217f5d0a3f 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -326,7 +326,7 @@ of the page moves to the previous page."
326 (delete-overlay ol)) 326 (delete-overlay ol))
327 (image-mode-window-put 'overlay ol winprops) 327 (image-mode-window-put 'overlay ol winprops)
328 (when (windowp (car winprops)) 328 (when (windowp (car winprops))
329 (if (stringp (get-char-property (point-min) 'display)) 329 (if (stringp (overlay-get ol 'display))
330 ;; We're not already displaying an image, so this is the 330 ;; We're not already displaying an image, so this is the
331 ;; initial window showing the document. 331 ;; initial window showing the document.
332 (run-with-timer nil nil 332 (run-with-timer nil nil
@@ -338,12 +338,11 @@ of the page moves to the previous page."
338 (with-selected-window (car winprops) 338 (with-selected-window (car winprops)
339 (doc-view-goto-page 1))))) 339 (doc-view-goto-page 1)))))
340 ;; We've split the window showing the document. All we need 340 ;; We've split the window showing the document. All we need
341 ;; to do is selecting the new window to make the image appear 341 ;; to do is selecting the new window to cause a redisplay to
342 ;; there, too. 342 ;; make the image appear there, too.
343 (run-with-timer nil nil 343 (run-with-timer nil nil
344 (lambda () 344 (lambda ()
345 (save-window-excursion 345 (with-selected-window (car winprops))))))))
346 (select-window (car winprops)))))))))
347 346
348(defvar doc-view-current-files nil 347(defvar doc-view-current-files nil
349 "Only used internally.") 348 "Only used internally.")
@@ -1026,7 +1025,7 @@ Start by converting PAGES, and then the rest."
1026 ;; not sufficient. 1025 ;; not sufficient.
1027 (dolist (win (get-buffer-window-list (current-buffer) nil 'visible)) 1026 (dolist (win (get-buffer-window-list (current-buffer) nil 'visible))
1028 (with-selected-window win 1027 (with-selected-window win
1029 (when (stringp (get-char-property (point-min) 'display)) 1028 (when (stringp (overlay-get (doc-view-current-overlay) 'display))
1030 (doc-view-goto-page (doc-view-current-page))))) 1029 (doc-view-goto-page (doc-view-current-page)))))
1031 ;; Convert the rest of the pages. 1030 ;; Convert the rest of the pages.
1032 (doc-view-pdf/ps->png pdf png))))))) 1031 (doc-view-pdf/ps->png pdf png)))))))