In display-buffer-record-window call point for selected window. (Bug#9626)

* window.el (display-buffer-record-window): When WINDOW is the
selected window use `point' instead of `window-point'.  (Bug#9626)
This commit is contained in:
Martin Rudalics 2011-09-29 11:20:45 +02:00
parent b5516bbd83
commit ccee00c018
2 changed files with 12 additions and 1 deletions

View file

@ -1,7 +1,11 @@
2011-09-29 Martin Rudalics <rudalics@gmx.at>
* window.el (display-buffer-record-window): When WINDOW is the
selected window use `point' instead of `window-point'. (Bug#9626)
* startup.el (command-line-1): Use insert-before-markers when
inserting initial-scratch-message. (Bug#9605)
* help.el (help-window): Remove variable.
2011-09-29 Glenn Morris <rgm@gnu.org>

View file

@ -3833,7 +3833,14 @@ element is BUFFER."
(list 'other
;; A quadruple of WINDOW's buffer, start, point and height.
(list (window-buffer window) (window-start window)
(window-point window) (window-total-size window))
(if (eq window (selected-window))
;; When WINDOW is the selected window use its
;; buffer's `point' instead of `window-point'
;; (Bug#9626).
(with-current-buffer (window-buffer window)
(point))
(window-point window))
(window-total-size window))
(selected-window) buffer))))
((eq type 'window)
;; WINDOW has been created on an existing frame.