summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Potortì <pot@gnu.org>1996-03-18 18:50:25 +0000
committerFrancesco Potortì <pot@gnu.org>1996-03-18 18:50:25 +0000
commitc877d0f4fc25b4ff62563d18821e74a1d0dfcece (patch)
treee9fd1ac16176c29e431ea0da1cea1a55cfe7110a
parent82625f92cf5f88395401e190bb88bb62ce99b5ea (diff)
downloademacs-c877d0f4fc25b4ff62563d18821e74a1d0dfcece.tar.gz
* simple.el (insert-buffer): Interactive default changed to a more
reasonable one.
-rw-r--r--lisp/simple.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index b24e6d87e2d..e28d2638d67 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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)