aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/image-mode.el
diff options
context:
space:
mode:
authorStefan Monnier2008-03-26 15:49:03 +0000
committerStefan Monnier2008-03-26 15:49:03 +0000
commit6d401b4e2e2f060a4dfa758f0d593034018a0067 (patch)
treedd353c32044469db9ec82703fa45cc7d9438e6f8 /lisp/image-mode.el
parent65b332f45fdd1f006dac416806ba772542a1ed62 (diff)
downloademacs-6d401b4e2e2f060a4dfa758f0d593034018a0067.tar.gz
emacs-6d401b4e2e2f060a4dfa758f0d593034018a0067.zip
(image-mode-reapply-winprops): Simplify now that
window-configuration-change-hook works buffer-locally.
Diffstat (limited to 'lisp/image-mode.el')
-rw-r--r--lisp/image-mode.el21
1 files changed, 8 insertions, 13 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 7064708c141..b5cfe57ed18 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -94,19 +94,14 @@ A winprops object has the shape (WINDOW . ALIST)."
94 (set-window-hscroll (selected-window) ncol)) 94 (set-window-hscroll (selected-window) ncol))
95 95
96(defun image-mode-reapply-winprops () 96(defun image-mode-reapply-winprops ()
97 (walk-windows 97 ;; When set-window-buffer, set hscroll and vscroll to what they were
98 (lambda (win) 98 ;; last time the image was displayed in this window.
99 (with-current-buffer (window-buffer win) 99 (when (listp image-mode-winprops-alist)
100 ;; When set-window-buffer, set hscroll and vscroll to what they were 100 (let* ((winprops (image-mode-winprops win))
101 ;; last time the image was displayed in this window. 101 (hscroll (image-mode-window-get 'hscroll winprops))
102 (when (listp image-mode-winprops-alist) 102 (vscroll (image-mode-window-get 'vscroll winprops)))
103 (let* ((winprops (image-mode-winprops win)) 103 (if hscroll (set-window-hscroll win hscroll))
104 (hscroll (image-mode-window-get 'hscroll winprops)) 104 (if vscroll (set-window-vscroll win vscroll)))))
105 (vscroll (image-mode-window-get 'vscroll winprops)))
106 (if hscroll (set-window-hscroll win hscroll))
107 (if vscroll (set-window-vscroll win vscroll))))))
108 'nomini
109 (selected-frame)))
110 105
111(defun image-mode-setup-winprops () 106(defun image-mode-setup-winprops ()
112 ;; Record current scroll settings. 107 ;; Record current scroll settings.