Subject: bug#2730: More info about select-frame problem

From: Fran Litterio <[email-masked]>
Date: Fri, 20 Mar 2009 13:45:57 -0400

Something strange is going on. My original bug report (and the patch it
contains) was motivated by a Wrong-number-of-arguments error caused when *
with-selected-frame* calls *select-frame* with two arguments. I sent the bug
report because M-x describe-function select-frame RET shows this:

select-frame is an interactive built-in function in `C source code'.

(select-frame frame)

Select the frame frame.
Subsequent editing commands apply to its selected window.
The selection of frame lasts until the next time the user does
something to select a different frame, or until the next time this
function is called.  If you are using a window system, the previously
selected frame may be restored as the selected frame after return to
the command loop, because it still may have the window system's input
focus.  On a text-only terminal, the next redisplay will display frame.

This function returns frame, or nil if frame has been deleted.

But this doesn't match the code in *src/frame.c* that defines *select-frame*
:

DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e",
       doc: /* Select FRAME.
Subsequent editing commands apply to its selected window.
Optional argument NORECORD means to neither change the order of
recently selected windows nor the buffer list.

The selection of FRAME lasts until the next time the user does
something to select a different frame, or until the next time
this function is called.  If you are using a window system, the
previously selected frame may be restored as the selected frame
after return to the command loop, because it still may have the
window system's input focus.  On a text-only terminal, the next
redisplay will display FRAME.

This function returns FRAME, or nil if FRAME has been deleted.  */)
     (frame, norecord)
     Lisp_Object frame, norecord;
{
  return do_switch_frame (frame, 1, 0, norecord);
}

I built Emacs from up-to-date CVS sources using these commands:

$ ./configure --prefix=/usr/local --with-jpeg=no --with-png=no --with-gif=no
--with-tiff=no
$ make bootstrap
$ sudo make install
--
Francis Litterio
[email-masked]