changeset 15347:3885819ed860

(make-frame-command): New function. (ctl-x-5-map): Change C-x 5 2 to make-frame-command.
author Richard M. Stallman <rms@gnu.org>
date Fri, 07 Jun 1996 14:52:28 +0000
parents 4cd6ff2384dc
children 8d78b06fbb46
files lisp/frame.el
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/frame.el	Fri Jun 07 14:28:16 1996 +0000
+++ b/lisp/frame.el	Fri Jun 07 14:52:28 1996 +0000
@@ -417,6 +417,13 @@
   (interactive "sMake frame on display: ")
   (make-frame (cons (cons 'display display) parameters)))
 
+(defun make-frame-command ()
+  "Make a new frame, and select it if the terminal displays only one frame."
+  (interactive)
+  (if window-system
+      (make-frame)
+    (select-frame (make-frame))))
+
 ;; Alias, kept temporarily.
 (defalias 'new-frame 'make-frame)
 (defun make-frame (&optional parameters)
@@ -705,7 +712,7 @@
 (defalias 'ctl-x-5-prefix ctl-x-5-map)
 (define-key ctl-x-map "5" 'ctl-x-5-prefix)
 
-(define-key ctl-x-5-map "2" 'make-frame)
+(define-key ctl-x-5-map "2" 'make-frame-command)
 (define-key ctl-x-5-map "0" 'delete-frame)
 (define-key ctl-x-5-map "o" 'other-frame)