aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-03-26 15:49:03 +0000
committerStefan Monnier2008-03-26 15:49:03 +0000
commit6d401b4e2e2f060a4dfa758f0d593034018a0067 (patch)
treedd353c32044469db9ec82703fa45cc7d9438e6f8
parent65b332f45fdd1f006dac416806ba772542a1ed62 (diff)
downloademacs-6d401b4e2e2f060a4dfa758f0d593034018a0067.tar.gz
emacs-6d401b4e2e2f060a4dfa758f0d593034018a0067.zip
(image-mode-reapply-winprops): Simplify now that
window-configuration-change-hook works buffer-locally.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/image-mode.el21
2 files changed, 13 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fa215b4c698..2e56cab6a79 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12008-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * image-mode.el (image-mode-reapply-winprops): Simplify now that
4 window-configuration-change-hook works buffer-locally.
5
12008-03-25 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> 62008-03-25 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
2 7
3 * proced.el: Add arch-tag. 8 * proced.el: Add arch-tag.
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.