From ccee00c0189fe7f59ef6136292d37a28378e52a0 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Thu, 29 Sep 2011 11:20:45 +0200 Subject: [PATCH] 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) --- lisp/ChangeLog | 4 ++++ lisp/window.el | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a5d048247a7..b217a9093f6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,11 @@ 2011-09-29 Martin Rudalics + * 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 diff --git a/lisp/window.el b/lisp/window.el index 512eebcc663..c6722a62c74 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -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. -- 2.39.2