changeset 14834:5ae5d97727ce

* simple.el (insert-buffer): Interactive default changed to a more reasonable one.
author Francesco Potortì <pot@gnu.org>
date Mon, 18 Mar 1996 18:50:25 +0000
parents f36ca038d81e
children eb78ddcff331
files lisp/simple.el
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Mon Mar 18 06:44:54 1996 +0000
+++ b/lisp/simple.el	Mon Mar 18 18:50:25 1996 +0000
@@ -1373,10 +1373,15 @@
   "Insert after point the contents of BUFFER.
 Puts mark after the inserted text.
 BUFFER may be a buffer or a buffer name."
-  (interactive (list (progn (barf-if-buffer-read-only)
-			    (read-buffer "Insert buffer: " 
-					 (other-buffer (current-buffer) t)
-					 t))))
+(interactive
+   (list
+    (progn
+      (barf-if-buffer-read-only)
+      (read-buffer "Insert buffer: "
+		   (if (eq (selected-window) (next-window (selected-window)))
+		       (other-buffer (current-buffer))
+		     (window-buffer (next-window (selected-window))))
+		   t))))
   (or (bufferp buffer)
       (setq buffer (get-buffer buffer)))
   (let (start end newmark)