From 1ea2993e83ad43bb9e93eb95fe858d2d90011a9e Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 1 Feb 2022 12:01:14 +0100 Subject: [PATCH] Improve make-frame-on-display initial values * doc/emacs/frames.texi (Multiple Displays): Add index entry for 'display server'. * lisp/frame.el (make-frame-on-display): Specify sensible initial values when reading display name. * lisp/menu-bar.el (menu-bar-file-menu): Use 'display server' rather than 'display' to avoid monitor<->display confusion. --- doc/emacs/frames.texi | 1 + lisp/frame.el | 4 +++- lisp/menu-bar.el | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 29edbe98633..e3cfe5f8441 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -949,6 +949,7 @@ Speedbar,,speedbar, Speedbar Manual}. @node Multiple Displays @section Multiple Displays @cindex multiple displays +@cindex display server A single Emacs can talk to more than one X display. Initially, Emacs uses just one display---the one specified with the @env{DISPLAY} diff --git a/lisp/frame.el b/lisp/frame.el index e9c88adc7cc..b681a971aa3 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -702,7 +702,9 @@ Return nil if we don't know how to interpret DISPLAY." The optional argument PARAMETERS specifies additional frame parameters." (interactive (if (fboundp 'x-display-list) (list (completing-read "Make frame on display: " - (x-display-list))) + (x-display-list) nil + nil (car (x-display-list)) + nil (car (x-display-list)))) (user-error "This Emacs build does not support X displays"))) (make-frame (cons (cons 'display display) parameters))) diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 7678b1ece66..e26355293f3 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -131,9 +131,9 @@ :visible (fboundp 'make-frame-on-monitor) :help "Open a new frame on another monitor")) (bindings--define-key menu [make-frame-on-display] - '(menu-item "New Frame on Display..." make-frame-on-display + '(menu-item "New Frame on Display Server..." make-frame-on-display :visible (fboundp 'make-frame-on-display) - :help "Open a new frame on another display")) + :help "Open a new frame on a display server")) (bindings--define-key menu [make-frame] '(menu-item "New Frame" make-frame-command :visible (fboundp 'make-frame-command) -- 2.39.5