diff options
| author | Eli Zaretskii | 2001-09-23 18:49:04 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2001-09-23 18:49:04 +0000 |
| commit | 5df7058ccefaa4220d1279273cb04fb2cbf6fcf2 (patch) | |
| tree | 0a5f79cb52b11830501c0c054053b8d36fc13221 | |
| parent | c03bac6b2a47603f9c2b7a712b65d4bd805d212e (diff) | |
| download | emacs-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.texi | 38 |
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 | |||
| 118 | the @code{display} frame parameter when you create the frame. | 118 | the @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 |
| 121 | own selected frame and its own minibuffer windows. | 121 | own selected frame and its own minibuffer windows. However, only one of |
| 122 | those 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 |
| 124 | separate binding for each terminal. The binding in effect at any time | 126 | separate 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 |
| 565 | by the window manager in its usual fashion. | 567 | by 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, | ||
| 571 | see @ref{Input Focus}.) | ||
| 568 | 572 | ||
| 569 | @defun set-frame-position frame left top | 573 | @defun set-frame-position frame left top |
| 570 | This function sets the position of the top left corner of @var{frame} to | 574 | This 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. | |||
| 778 | The function @code{next-frame} lets you cycle conveniently through all | 782 | The function @code{next-frame} lets you cycle conveniently through all |
| 779 | the frames from an arbitrary starting point. It returns the ``next'' | 783 | the frames from an arbitrary starting point. It returns the ``next'' |
| 780 | frame after @var{frame} in the cycle. If @var{frame} is omitted or | 784 | frame 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 | ||
| 783 | The second argument, @var{minibuf}, says which frames to consider: | 787 | The second argument, @var{minibuf}, says which frames to consider: |
| 784 | 788 | ||
| @@ -873,6 +877,17 @@ buffer-local. @xref{Multiple Displays}. | |||
| 873 | At any time, one frame in Emacs is the @dfn{selected frame}. The selected | 877 | At any time, one frame in Emacs is the @dfn{selected frame}. The selected |
| 874 | window always resides on the selected frame. | 878 | window always resides on the selected frame. |
| 875 | 879 | ||
| 880 | When Emacs displays its frames on several terminals (@pxref{Multiple | ||
| 881 | Displays}), each terminal has its own selected frame. But only one of | ||
| 882 | these is ``@emph{the} selected frame'': it's the frame that belongs to | ||
| 883 | the terminal from which the most recent input came. That is, when Emacs | ||
| 884 | runs a command that came from a certain terminal, the selected frame is | ||
| 885 | the one of that terminal. Since Emacs runs only a single command at any | ||
| 886 | given time, it needs to consider only one selected frame at a time; this | ||
| 887 | frame is what we call @dfn{the selected frame} in this manual. The | ||
| 888 | display on which the selected frame is displayed is the @dfn{selected | ||
| 889 | frame's display}. | ||
| 890 | |||
| 876 | @defun selected-frame | 891 | @defun selected-frame |
| 877 | This function returns the selected frame. | 892 | This 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}). | |||
| 899 | This function selects frame @var{frame}, temporarily disregarding the | 914 | This function selects frame @var{frame}, temporarily disregarding the |
| 900 | focus of the X server if any. The selection of @var{frame} lasts until | 915 | focus of the X server if any. The selection of @var{frame} lasts until |
| 901 | the next time the user does something to select a different frame, or | 916 | the next time the user does something to select a different frame, or |
| 902 | until the next time this function is called. | 917 | until the next time this function is called. The specified @var{frame} |
| 918 | becomes the selected frame, as explained above, and the terminal that | ||
| 919 | @var{frame} is on becomes the selected terminal. | ||
| 920 | |||
| 921 | In general, you should never use @code{select-frame} in a way that could | ||
| 922 | switch to a different terminal without switching back when you're done. | ||
| 903 | @end defun | 923 | @end defun |
| 904 | 924 | ||
| 905 | Emacs cooperates with the window system by arranging to select frames as | 925 | Emacs 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 |
| 1418 | valid, and what they look like. | 1438 | valid, 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 | ||
| 1440 | meaning 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 | |||
| 1523 | terminal) as an optional argument. We hope in the future to make Emacs | 1545 | terminal) as an optional argument. We hope in the future to make Emacs |
| 1524 | support more than one text-only terminal at one time; then this argument | 1546 | support more than one text-only terminal at one time; then this argument |
| 1525 | will specify which terminal to operate on (the default being the | 1547 | will specify which terminal to operate on (the default being the |
| 1526 | selected frame's terminal). At present, though, the @var{display} | 1548 | selected frame's terminal; @pxref{Input Focus}). At present, though, |
| 1527 | argument has no effect. | 1549 | the @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 |
| 1614 | display to ask the question about. It can be a display name, a frame | 1636 | display 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 |
| 1616 | refers to the selected frame's display). | 1638 | refers 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 |
| 1619 | obtain information about displays. | 1641 | obtain information about displays. |