Commit c069a480 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(append-to-buffer): Update point of windows after

parent 46684068
......@@ -2011,9 +2011,16 @@ START and END specify the portion of the current buffer to be copied."
(region-beginning) (region-end)))
(let ((oldbuf (current-buffer)))
(set-buffer (get-buffer-create buffer))
(insert-buffer-substring oldbuf start end))))
(let* ((append-to (get-buffer-create buffer))
(windows (get-buffer-window-list append-to t t))
(set-buffer append-to)
(setq point (point))
(insert-buffer-substring oldbuf start end)
(dolist (window windows)
(when (= (window-point window) point)
(set-window-point window (point))))))))
(defun prepend-to-buffer (buffer start end)
"Prepend to specified buffer the text of the region.
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