summaryrefslogtreecommitdiff
path: root/lisp/frame.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-06-07 14:52:28 +0000
committerRichard M. Stallman <rms@gnu.org>1996-06-07 14:52:28 +0000
commit9682deed6b61af8d0c2979bb79d47f47604b0e35 (patch)
treea9698f5b77d58651081451ebdcf129d4769ea206 /lisp/frame.el
parent426db4484f1e1e9e257897d73cb0feaf9932ccd3 (diff)
downloademacs-9682deed6b61af8d0c2979bb79d47f47604b0e35.tar.gz
(make-frame-command): New function.
(ctl-x-5-map): Change C-x 5 2 to make-frame-command.
Diffstat (limited to 'lisp/frame.el')
-rw-r--r--lisp/frame.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index 29d8c76f5aa..a5e0c816053 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -417,6 +417,13 @@ The optional second argument PARAMETERS specifies additional frame parameters."
(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 @@ should use `set-frame-width' instead."
(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)