Commit 6d401b4e authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(image-mode-reapply-winprops): Simplify now that

window-configuration-change-hook works buffer-locally.
parent 65b332f4
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.
......
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment