Commit d0fba174 authored by Chong Yidong's avatar Chong Yidong
Browse files

Fix 2009-11-13 change to append-to-buffer (Bug#5749).

* simple.el (append-to-buffer): Ensure that point is preserved if
BUFFER is the current buffer.  Suggested by YAMAMOTO Mitsuharu.
(Bug#5749)
parent efee6a6d
2010-03-24 Chong Yidong <cyd@stupidchicken.com>
* simple.el (append-to-buffer): Ensure that point is preserved if
BUFFER is the current buffer. Suggested by YAMAMOTO Mitsuharu.
(Bug#5749)
2010-03-24 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/make-mode.el (makefile-rule-action-regex): Backtrack less.
......
......@@ -3473,12 +3473,13 @@ START and END specify the portion of the current buffer to be copied."
(windows (get-buffer-window-list append-to t t))
point)
(with-current-buffer append-to
(setq point (point))
(barf-if-buffer-read-only)
(insert-buffer-substring oldbuf start end)
(dolist (window windows)
(when (= (window-point window) point)
(set-window-point window (point))))))))
(save-excursion
(setq point (point))
(barf-if-buffer-read-only)
(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