From: Gerd Moellmann Date: Wed, 19 Apr 2000 20:40:46 +0000 (+0000) Subject: (clone-indirect-buffer-other-window): New command. X-Git-Tag: emacs-pretest-21.0.90~4188 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7e3afb0402b284acec8c91137bbe445e0e126a52;p=emacs.git (clone-indirect-buffer-other-window): New command. (clone-indirect-buffer): Add optional arg NORECROD. (toplevel): Bind `C-x 4 c' to clone-indirect-buffer-other-window. --- diff --git a/lisp/simple.el b/lisp/simple.el index 69ce6e19e87..5dc6260e484 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4158,7 +4158,7 @@ after it has been set up properly in other respects." new)) -(defun clone-indirect-buffer (newname display-flag) +(defun clone-indirect-buffer (newname display-flag &optional norecord) "Create an indirect buffer that is a twin copy of the current buffer. Give the indirect buffer name NEWNAME. Interactively, read NEW-NAME @@ -4168,7 +4168,10 @@ buffer's name. The name is modified by adding a `' suffix to it or by incrementing the N in an existing suffix. DISPLAY-FLAG non-nil means show the new buffer with `pop-to-buffer'. -This is always done when called interactively." +This is always done when called interactively. + +Optional last arg NORECORD non-nil means do not put this buffer at the +front of the list of recently selected ones." (interactive (list (if current-prefix-arg (read-string "BName of indirect buffer: ")) t)) @@ -4182,6 +4185,18 @@ This is always done when called interactively." buffer)) +(defun clone-indirect-buffer-other-window (buffer &optional norecord) + "Create an indirect buffer that is a twin copy of BUFFER. +Select the new buffer in another window. +Optional second arg NORECORD non-nil means do not put this buffer at +the front of the list of recently selected ones." + (interactive "bClone buffer in other window: ") + (let ((popup-windows t)) + (set-buffer buffer) + (clone-indirect-buffer nil t norecord))) + +(define-key ctl-x-4-map "c" 'display-buffer) + ;;; Syntax stuff.