aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2001-09-23 18:49:04 +0000
committerEli Zaretskii2001-09-23 18:49:04 +0000
commit5df7058ccefaa4220d1279273cb04fb2cbf6fcf2 (patch)
tree0a5f79cb52b11830501c0c054053b8d36fc13221
parentc03bac6b2a47603f9c2b7a712b65d4bd805d212e (diff)
downloademacs-5df7058ccefaa4220d1279273cb04fb2cbf6fcf2.tar.gz
emacs-5df7058ccefaa4220d1279273cb04fb2cbf6fcf2.zip
(Input Focus): Clarify which frame is _the_ selected
frame at any given time. (Multiple Displays, Size and Position): Add cross-references to the definition of the selected frame.
-rw-r--r--lispref/frames.texi38
1 files changed, 30 insertions, 8 deletions
diff --git a/lispref/frames.texi b/lispref/frames.texi
index 0e78b88aa8a..22d11d951bd 100644
--- a/lispref/frames.texi
+++ b/lispref/frames.texi
@@ -118,7 +118,9 @@ another display, use the command @code{make-frame-on-display} or specify
118the @code{display} frame parameter when you create the frame. 118the @code{display} frame parameter when you create the frame.
119 119
120 Emacs treats each X server as a separate terminal, giving each one its 120 Emacs treats each X server as a separate terminal, giving each one its
121own selected frame and its own minibuffer windows. 121own selected frame and its own minibuffer windows. However, only one of
122those frames is ``@emph{the} selected frame'' at any given moment, see
123@ref{Input Focus}.
122 124
123 A few Lisp variables are @dfn{terminal-local}; that is, they have a 125 A few Lisp variables are @dfn{terminal-local}; that is, they have a
124separate binding for each terminal. The binding in effect at any time 126separate binding for each terminal. The binding in effect at any time
@@ -564,7 +566,9 @@ frame parameters @code{left}, @code{top}, @code{height}, and
564@code{width}. Whatever geometry parameters you don't specify are chosen 566@code{width}. Whatever geometry parameters you don't specify are chosen
565by the window manager in its usual fashion. 567by the window manager in its usual fashion.
566 568
567 Here are some special features for working with sizes and positions: 569 Here are some special features for working with sizes and positions.
570(For the precise meaning of ``selected frame'' used by these functions,
571see @ref{Input Focus}.)
568 572
569@defun set-frame-position frame left top 573@defun set-frame-position frame left top
570This function sets the position of the top left corner of @var{frame} to 574This function sets the position of the top left corner of @var{frame} to
@@ -778,7 +782,7 @@ This function returns a list of just the currently visible frames.
778The function @code{next-frame} lets you cycle conveniently through all 782The function @code{next-frame} lets you cycle conveniently through all
779the frames from an arbitrary starting point. It returns the ``next'' 783the frames from an arbitrary starting point. It returns the ``next''
780frame after @var{frame} in the cycle. If @var{frame} is omitted or 784frame after @var{frame} in the cycle. If @var{frame} is omitted or
781@code{nil}, it defaults to the selected frame. 785@code{nil}, it defaults to the selected frame (@pxref{Input Focus}).
782 786
783The second argument, @var{minibuf}, says which frames to consider: 787The second argument, @var{minibuf}, says which frames to consider:
784 788
@@ -873,6 +877,17 @@ buffer-local. @xref{Multiple Displays}.
873At any time, one frame in Emacs is the @dfn{selected frame}. The selected 877At any time, one frame in Emacs is the @dfn{selected frame}. The selected
874window always resides on the selected frame. 878window always resides on the selected frame.
875 879
880When Emacs displays its frames on several terminals (@pxref{Multiple
881Displays}), each terminal has its own selected frame. But only one of
882these is ``@emph{the} selected frame'': it's the frame that belongs to
883the terminal from which the most recent input came. That is, when Emacs
884runs a command that came from a certain terminal, the selected frame is
885the one of that terminal. Since Emacs runs only a single command at any
886given time, it needs to consider only one selected frame at a time; this
887frame is what we call @dfn{the selected frame} in this manual. The
888display on which the selected frame is displayed is the @dfn{selected
889frame's display}.
890
876@defun selected-frame 891@defun selected-frame
877This function returns the selected frame. 892This function returns the selected frame.
878@end defun 893@end defun
@@ -899,7 +914,12 @@ in the mode line before the buffer name (@pxref{Mode Line Variables}).
899This function selects frame @var{frame}, temporarily disregarding the 914This function selects frame @var{frame}, temporarily disregarding the
900focus of the X server if any. The selection of @var{frame} lasts until 915focus of the X server if any. The selection of @var{frame} lasts until
901the next time the user does something to select a different frame, or 916the next time the user does something to select a different frame, or
902until the next time this function is called. 917until the next time this function is called. The specified @var{frame}
918becomes the selected frame, as explained above, and the terminal that
919@var{frame} is on becomes the selected terminal.
920
921In general, you should never use @code{select-frame} in a way that could
922switch to a different terminal without switching back when you're done.
903@end defun 923@end defun
904 924
905Emacs cooperates with the window system by arranging to select frames as 925Emacs cooperates with the window system by arranging to select frames as
@@ -1415,7 +1435,9 @@ but @code{t} on MS-Windows.
1415@section Color Names 1435@section Color Names
1416 1436
1417 These functions provide a way to determine which color names are 1437 These functions provide a way to determine which color names are
1418valid, and what they look like. 1438valid, and what they look like. In some cases, the value depends on the
1439@dfn{selected frame}, as described below; see @ref{Input Focus}, for the
1440meaning of the term ``selected frame''.
1419 1441
1420@defun color-defined-p color &optional frame 1442@defun color-defined-p color &optional frame
1421@tindex color-defined-p 1443@tindex color-defined-p
@@ -1523,8 +1545,8 @@ principle from 0 to 65535, but in practice the largest value used is
1523terminal) as an optional argument. We hope in the future to make Emacs 1545terminal) as an optional argument. We hope in the future to make Emacs
1524support more than one text-only terminal at one time; then this argument 1546support more than one text-only terminal at one time; then this argument
1525will specify which terminal to operate on (the default being the 1547will specify which terminal to operate on (the default being the
1526selected frame's terminal). At present, though, the @var{display} 1548selected frame's terminal; @pxref{Input Focus}). At present, though,
1527argument has no effect. 1549the @var{display} argument has no effect.
1528 1550
1529@defun tty-color-define name number &optional rgb display 1551@defun tty-color-define name number &optional rgb display
1530@tindex tty-color-define 1552@tindex tty-color-define
@@ -1613,7 +1635,7 @@ a popup menu could use the minibuffer if popup menus are not supported.
1613 The optional argument @var{display} in these functions specifies which 1635 The optional argument @var{display} in these functions specifies which
1614display to ask the question about. It can be a display name, a frame 1636display to ask the question about. It can be a display name, a frame
1615(which designates the display that frame is on), or @code{nil} (which 1637(which designates the display that frame is on), or @code{nil} (which
1616refers to the selected frame's display). 1638refers to the selected frame's display, @pxref{Input Focus}).
1617 1639
1618 @xref{Color Names}, @ref{Text Terminal Colors}, for other functions to 1640 @xref{Color Names}, @ref{Text Terminal Colors}, for other functions to
1619obtain information about displays. 1641obtain information about displays.