Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
6d401b4e
Commit
6d401b4e
authored
Mar 26, 2008
by
Stefan Monnier
Browse files
(image-mode-reapply-winprops): Simplify now that
window-configuration-change-hook works buffer-locally.
parent
65b332f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/image-mode.el
lisp/image-mode.el
+8
-13
No files found.
lisp/ChangeLog
View file @
6d401b4e
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.
...
...
lisp/image-mode.el
View file @
6d401b4e
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment