summaryrefslogtreecommitdiff
path: root/lisp/image-mode.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2008-03-26 15:49:03 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2008-03-26 15:49:03 +0000
commit6d401b4e2e2f060a4dfa758f0d593034018a0067 (patch)
treedd353c32044469db9ec82703fa45cc7d9438e6f8 /lisp/image-mode.el
parent65b332f45fdd1f006dac416806ba772542a1ed62 (diff)
downloademacs-6d401b4e2e2f060a4dfa758f0d593034018a0067.tar.gz
(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)."
(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.