From ab9b3866b86877568d1ab5cf1dc07fbcf33d8c69 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 20 Mar 2006 15:05:41 +0000 Subject: [PATCH] (display-buffer-other-frame): New command. (ctl-x-4-map): Bind C-x 5 C-o to it. --- lisp/ChangeLog | 5 +++++ lisp/files.el | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2878b8b9784..076b32abcf1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-03-20 Richard Stallman + + * files.el (display-buffer-other-frame): New command. + (ctl-x-4-map): Bind C-x 5 C-o to it. + 2006-03-20 Stefan Monnier * jit-lock.el (jit-lock-function): Check for the actual defer-timer diff --git a/lisp/files.el b/lisp/files.el index c093a5222b2..fc44193838d 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -990,6 +990,20 @@ documentation for additional customization information." (pop-to-buffer buffer t norecord) (raise-frame (window-frame (selected-window))))) +(defun display-buffer-other-frame (buffer) + "Switch to buffer BUFFER in another frame. +This uses the function `display-buffer' as a subroutine; see its +documentation for additional customization information." + (interactive "BDisplay buffer in other frame: ") + (let ((pop-up-frames t) + same-window-buffer-names same-window-regexps + (old-window (selected-window)) + new-window) + (setq new-window (display-buffer buffer t)) + (lower-frame (window-frame new-window)) + (make-frame-invisible (window-frame old-window)) + (make-frame-visible (window-frame old-window)))) + (defvar find-file-default nil "Used within `find-file-read-args'.") @@ -5137,6 +5151,7 @@ With prefix arg, silently save all file-visiting buffers, then kill." (define-key ctl-x-5-map "f" 'find-file-other-frame) (define-key ctl-x-5-map "\C-f" 'find-file-other-frame) (define-key ctl-x-5-map "r" 'find-file-read-only-other-frame) +(define-key ctl-x-4-map "\C-o" 'display-buffer-other-frame) ;; arch-tag: bc68d3ea-19ca-468b-aac6-3a4a7766101f ;;; files.el ends here -- 2.39.2