From 6d401b4e2e2f060a4dfa758f0d593034018a0067 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 26 Mar 2008 15:49:03 +0000 Subject: [PATCH] (image-mode-reapply-winprops): Simplify now that window-configuration-change-hook works buffer-locally. --- lisp/ChangeLog | 5 +++++ lisp/image-mode.el | 21 ++++++++------------- 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 @@ +2008-03-26 Stefan Monnier + + * image-mode.el (image-mode-reapply-winprops): Simplify now that + window-configuration-change-hook works buffer-locally. + 2008-03-25 Roland Winkler * 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)." (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. -- 2.39.5