]> code.delx.au - gnu-emacs/commitdiff
(display-buffer-other-frame): New command.
authorRichard M. Stallman <rms@gnu.org>
Mon, 20 Mar 2006 15:05:41 +0000 (15:05 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 20 Mar 2006 15:05:41 +0000 (15:05 +0000)
(ctl-x-4-map): Bind C-x 5 C-o to it.

lisp/ChangeLog
lisp/files.el

index 2878b8b97846b07ab2785168155dc9a650c572da..076b32abcf1391ed189d87fa1a8093b8d8ed8c83 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-20  Richard Stallman  <rms@gnu.org>
+
+       * 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  <monnier@iro.umontreal.ca>
 
        * jit-lock.el (jit-lock-function): Check for the actual defer-timer
index c093a5222b2ddac9e16af3fce37c7902eaa72369..fc44193838dd9da9aa30cbc3cf1611c5bd98e91f 100644 (file)
@@ -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