--- Begin Message ---
Subject: |
23.0.60; doc of make-frame-command |
Date: |
Tue, 14 Oct 2008 10:42:43 -0700 |
The doc string of `make-frame-command' (`C-x 5 2') says:
"Make a new frame, and select it if the terminal displays only one
frame."
The Emacs manual says:
"Create a new frame" (node Creating Frames)
"Use `C-x 5 2' to create a new frame and switch to it" (node
Non-Window Terminals)
The code does this:
(if (and window-system (not (eq window-system 'pc)))
(make-frame)
(select-frame (make-frame)))
1. Why the difference for `pc'?
2. What does the doc string mean by "terminal" and "if the terminal
displays only one frame"? If "terminal" refers only to emacs -nw, then
nothing is said about the window-manager case. If "terminal" refers to
both -nw and window mgr cases, then it seems false for the latter -
whether the new frame is selected has nothing to do with whether there
is only one frame.
3. Node Creating Frames of the manual should say also that the frame
is selected for a non-window system.
4. Somewhere, we should say that the current buffer is what is
displayed (alone) in the new frame.
5. However, we should also mention this apparent exception to #4: If
the current frame is a standalone minibuffer frame, then the buffer
displayed in the new frame is *scratch*. Are there other exceptions?
In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
of 2008-10-03 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include
-fno-crossjumping'
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#1165: 23.0.60; doc of make-frame-command |
Date: |
Wed, 22 Oct 2008 17:11:27 -0400 |
> > (if (and window-system (not (eq window-system 'pc)))
> > (make-frame)
> > (select-frame (make-frame)))
> >
> > 1. Why the difference for `pc'?
>
> `pc' is the value of window-system for the MS-DOS build of Emacs. The
> MS-DOS build behaves like a text terminal, but its window-system has a
> non-nil value; thus the difference.
>
> Although correct, that code should actually be rewritten using
> display-graphic-p to become cleaner.
Indeed. I've changed it to use display-graphic-p.
> > 2. What does the doc string mean by "terminal" and "if the terminal
> > displays only one frame"?
>
> It means the text-only terminals, which can only display one frame at
> a time.
I tweaked the doc-string to make this clearer.
--- End Message ---