changeset 93252:d5bb646771f8

(image-mode-reapply-winprops): Simplify now that window-configuration-change-hook works buffer-locally.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 26 Mar 2008 15:49:03 +0000
parents 704f321547cf
children 3f6a5dbeadc8
files lisp/ChangeLog lisp/image-mode.el
diffstat 2 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Mar 26 15:22:14 2008 +0000
+++ b/lisp/ChangeLog	Wed Mar 26 15:49:03 2008 +0000
@@ -1,3 +1,8 @@
+2008-03-26  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* image-mode.el (image-mode-reapply-winprops): Simplify now that
+	window-configuration-change-hook works buffer-locally.
+
 2008-03-25  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
 
 	* proced.el: Add arch-tag.
--- a/lisp/image-mode.el	Wed Mar 26 15:22:14 2008 +0000
+++ b/lisp/image-mode.el	Wed Mar 26 15:49:03 2008 +0000
@@ -94,19 +94,14 @@
   (set-window-hscroll (selected-window) ncol))
 
 (defun image-mode-reapply-winprops ()
-  (walk-windows
-   (lambda (win)
-     (with-current-buffer (window-buffer win)
-       ;; When set-window-buffer, set hscroll and vscroll to what they were
-       ;; last time the image was displayed in this window.
-       (when (listp image-mode-winprops-alist)
-         (let* ((winprops (image-mode-winprops win))
-                (hscroll (image-mode-window-get 'hscroll winprops))
-                (vscroll (image-mode-window-get 'vscroll winprops)))
-           (if hscroll (set-window-hscroll win hscroll))
-           (if vscroll (set-window-vscroll win vscroll))))))
-   'nomini
-   (selected-frame)))
+  ;; When set-window-buffer, set hscroll and vscroll to what they were
+  ;; last time the image was displayed in this window.
+  (when (listp image-mode-winprops-alist)
+    (let* ((winprops (image-mode-winprops win))
+           (hscroll (image-mode-window-get 'hscroll winprops))
+           (vscroll (image-mode-window-get 'vscroll winprops)))
+      (if hscroll (set-window-hscroll win hscroll))
+      (if vscroll (set-window-vscroll win vscroll)))))
 
 (defun image-mode-setup-winprops ()
   ;; Record current scroll settings.