]> git.eshelyaron.com Git - emacs.git/commitdiff
(image-mode-reapply-winprops): Simplify now that
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 26 Mar 2008 15:49:03 +0000 (15:49 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 26 Mar 2008 15:49:03 +0000 (15:49 +0000)
window-configuration-change-hook works buffer-locally.

lisp/ChangeLog
lisp/image-mode.el

index fa215b4c698c79df1fadffe29c1733175b8b6a66..2e56cab6a79817b2fdc826f52a6c250ec63f2feb 100644 (file)
@@ -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.
index 7064708c1413dc201c978dcb1b536f29bc98e9bf..b5cfe57ed18694ad5e7c8492be87ba3583bcf269 100644 (file)
@@ -94,19 +94,14 @@ A winprops object has the shape (WINDOW . ALIST)."
   (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.