]> git.eshelyaron.com Git - emacs.git/commitdiff
* simple.el (insert-buffer): Interactive default changed to a more
authorFrancesco Potortì <pot@gnu.org>
Mon, 18 Mar 1996 18:50:25 +0000 (18:50 +0000)
committerFrancesco Potortì <pot@gnu.org>
Mon, 18 Mar 1996 18:50:25 +0000 (18:50 +0000)
  reasonable one.

lisp/simple.el

index b24e6d87e2d23f20fd113269291248c740fcfa86..e28d2638d67a9229878d325b1e95feb5fbce229d 100644 (file)
@@ -1373,10 +1373,15 @@ With argument, rotate that many kills forward (or backward, if negative)."
   "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)