diff lisp/simple.el @ 107710:db1a1651507b

* simple.el (append-to-buffer): Simplify.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 30 Mar 2010 22:53:53 -0400
parents 27d7bc8db6b7
children f0a2ddb8569a
line wrap: on
line diff
--- a/lisp/simple.el	Tue Mar 30 22:37:57 2010 -0400
+++ b/lisp/simple.el	Tue Mar 30 22:53:53 2010 -0400
@@ -3468,18 +3468,18 @@
   (interactive
    (list (read-buffer "Append to buffer: " (other-buffer (current-buffer) t))
 	 (region-beginning) (region-end)))
-  (let ((oldbuf (current-buffer)))
-    (let* ((append-to (get-buffer-create buffer))
-           (windows (get-buffer-window-list append-to t t))
-           point)
-      (save-excursion
-	(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)))))))))
+  (let* ((oldbuf (current-buffer))
+         (append-to (get-buffer-create buffer))
+         (windows (get-buffer-window-list append-to t t))
+         point)
+    (save-excursion
+      (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))))))))
 
 (defun prepend-to-buffer (buffer start end)
   "Prepend to specified buffer the text of the region.