diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-05-24 13:42:23 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-05-24 13:42:23 -0400 |
commit | 5010583555fce883d83e7a50e26d9d34f9e108ce (patch) | |
tree | 4de9abcb55be0e5bc8bb4f1860ffc0ed331636fa /lisp/image-mode.el | |
parent | a4f59c0fb9e684f06ab82236474fbf4586968dad (diff) | |
download | emacs-5010583555fce883d83e7a50e26d9d34f9e108ce.tar.gz |
* lisp/image-mode.el (image-mode-winprops): Add winprops to
image-mode-winprops-alist before running image-mode-new-window-functions.
* lisp/doc-view.el (doc-view-new-window-function): Don't delay
doc-view-goto-page via timers.
Fixes: debbugs:14435
Diffstat (limited to 'lisp/image-mode.el')
-rw-r--r-- | lisp/image-mode.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index ac090f020b3..909e2fa247f 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -69,13 +69,17 @@ otherwise it defaults to t, used for times when the buffer is not displayed." image-mode-winprops-alist)))) (let ((winprops (assq window image-mode-winprops-alist))) ;; For new windows, set defaults from the latest. - (unless winprops + (if winprops + ;; Move window to front. + (setq image-mode-winprops-alist + (cons winprops (delq winprops image-mode-winprops-alist))) (setq winprops (cons window (copy-alist (cdar image-mode-winprops-alist)))) + ;; Add winprops before running the hook, to avoid inf-loops if the hook + ;; triggers window-configuration-change-hook. + (setq image-mode-winprops-alist + (cons winprops image-mode-winprops-alist)) (run-hook-with-args 'image-mode-new-window-functions winprops)) - ;; Move window to front. - (setq image-mode-winprops-alist - (cons winprops (delq winprops image-mode-winprops-alist))) winprops)) (defun image-mode-window-get (prop &optional winprops) |