diff options
| author | Chong Yidong | 2009-04-04 22:34:23 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-04-04 22:34:23 +0000 |
| commit | 3ec61d4e52d0b77e760331853878ab303141e125 (patch) | |
| tree | ee0e31323f541be9de4827f655f169ff5234e02f | |
| parent | e173bbce451a12940bd8399f7f8a9b9b310f7007 (diff) | |
| download | emacs-3ec61d4e52d0b77e760331853878ab303141e125.tar.gz emacs-3ec61d4e52d0b77e760331853878ab303141e125.zip | |
* frames.texi (Frames): Clean up introduction. Document `ns'
return value for framep.
(Creating Frames): Note how the terminal is chosen.
(Multiple Terminals, Multiple Displays): Merge into a single node.
(Color Parameters): Fix typo.
* variables.texi (Local Variables, Buffer-Local Variables)
(Creating Buffer-Local): Change link to Multiple Terminals.
* os.texi (X11 Keysyms): Change link to Multiple Terminals.
* keymaps.texi (Controlling Active Maps): Change link to Multiple
Terminals.
* commands.texi (Command Loop Info, Keyboard Macros): Change link
to Multiple Terminals.
* elisp.texi (Top): Update node listing.
* vol2.texi (Top): Update node listing.
* vol1.texi (Top): Update node listing.
| -rw-r--r-- | doc/lispref/ChangeLog | 21 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 3 | ||||
| -rw-r--r-- | doc/lispref/frames.texi | 379 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/variables.texi | 8 | ||||
| -rw-r--r-- | doc/lispref/vol1.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/vol2.texi | 2 |
9 files changed, 230 insertions, 195 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index ed74c25f8d8..35467cf747a 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,5 +1,26 @@ | |||
| 1 | 2009-04-04 Chong Yidong <cyd@stupidchicken.com> | 1 | 2009-04-04 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 2 | ||
| 3 | * frames.texi (Frames): Clean up introduction. Document `ns' | ||
| 4 | return value for framep. | ||
| 5 | (Creating Frames): Note how the terminal is chosen. | ||
| 6 | (Multiple Terminals, Multiple Displays): Merge into a single node. | ||
| 7 | (Color Parameters): Fix typo. | ||
| 8 | |||
| 9 | * variables.texi (Local Variables, Buffer-Local Variables) | ||
| 10 | (Creating Buffer-Local): Change link to Multiple Terminals. | ||
| 11 | |||
| 12 | * os.texi (X11 Keysyms): Change link to Multiple Terminals. | ||
| 13 | |||
| 14 | * keymaps.texi (Controlling Active Maps): Change link to Multiple | ||
| 15 | Terminals. | ||
| 16 | |||
| 17 | * commands.texi (Command Loop Info, Keyboard Macros): Change link | ||
| 18 | to Multiple Terminals. | ||
| 19 | |||
| 20 | * elisp.texi (Top): Update node listing. | ||
| 21 | * vol2.texi (Top): Update node listing. | ||
| 22 | * vol1.texi (Top): Update node listing. | ||
| 23 | |||
| 3 | * buffers.texi (Current Buffer): Note that the append-to-buffer | 24 | * buffers.texi (Current Buffer): Note that the append-to-buffer |
| 4 | example is no longer in synch with the latest code. Tie the two | 25 | example is no longer in synch with the latest code. Tie the two |
| 5 | examples together. | 26 | examples together. |
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 3eb339825cf..0bf6fc5197a 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -781,7 +781,7 @@ the command loop, except when the command has specified a prefix | |||
| 781 | argument for the following command. | 781 | argument for the following command. |
| 782 | 782 | ||
| 783 | This variable is always local to the current terminal and cannot be | 783 | This variable is always local to the current terminal and cannot be |
| 784 | buffer-local. @xref{Multiple Displays}. | 784 | buffer-local. @xref{Multiple Terminals}. |
| 785 | @end defvar | 785 | @end defvar |
| 786 | 786 | ||
| 787 | @defvar real-last-command | 787 | @defvar real-last-command |
| @@ -3340,7 +3340,7 @@ The commands @code{start-kbd-macro}, @code{kmacro-start-macro} and | |||
| 3340 | @code{end-kbd-macro} set this variable---do not set it yourself. | 3340 | @code{end-kbd-macro} set this variable---do not set it yourself. |
| 3341 | 3341 | ||
| 3342 | The variable is always local to the current terminal and cannot be | 3342 | The variable is always local to the current terminal and cannot be |
| 3343 | buffer-local. @xref{Multiple Displays}. | 3343 | buffer-local. @xref{Multiple Terminals}. |
| 3344 | @end defvar | 3344 | @end defvar |
| 3345 | 3345 | ||
| 3346 | @defvar last-kbd-macro | 3346 | @defvar last-kbd-macro |
| @@ -3348,7 +3348,7 @@ This variable is the definition of the most recently defined keyboard | |||
| 3348 | macro. Its value is a string or vector, or @code{nil}. | 3348 | macro. Its value is a string or vector, or @code{nil}. |
| 3349 | 3349 | ||
| 3350 | The variable is always local to the current terminal and cannot be | 3350 | The variable is always local to the current terminal and cannot be |
| 3351 | buffer-local. @xref{Multiple Displays}. | 3351 | buffer-local. @xref{Multiple Terminals}. |
| 3352 | @end defvar | 3352 | @end defvar |
| 3353 | 3353 | ||
| 3354 | @defvar kbd-macro-termination-hook | 3354 | @defvar kbd-macro-termination-hook |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index c7745a92024..aa443350c1a 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -938,8 +938,7 @@ Windows | |||
| 938 | Frames | 938 | Frames |
| 939 | 939 | ||
| 940 | * Creating Frames:: Creating additional frames. | 940 | * Creating Frames:: Creating additional frames. |
| 941 | * Multiple Displays:: Creating frames on other displays. | 941 | * Multiple Terminals:: Displaying on several different devices. |
| 942 | * Multiple Terminals:: Displaying on several different devices. | ||
| 943 | * Frame Parameters:: Controlling frame size, position, font, etc. | 942 | * Frame Parameters:: Controlling frame size, position, font, etc. |
| 944 | * Terminal Parameters:: Parameters common for all frames on terminal. | 943 | * Terminal Parameters:: Parameters common for all frames on terminal. |
| 945 | * Frame Titles:: Automatic updating of frame titles. | 944 | * Frame Titles:: Automatic updating of frame titles. |
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index d369be154d8..42deed05d68 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -8,39 +8,42 @@ | |||
| 8 | @chapter Frames | 8 | @chapter Frames |
| 9 | @cindex frame | 9 | @cindex frame |
| 10 | 10 | ||
| 11 | In Emacs editing, a @dfn{frame} is a screen object that contains one | 11 | A @dfn{frame} is a screen object that contains one or more Emacs |
| 12 | or more Emacs windows, see @ref{Windows}. It's the kind of object that | 12 | windows (@pxref{Windows}). It is the kind of object called a |
| 13 | is called a ``window'' in the terminology of graphical environments; but | 13 | ``window'' in the terminology of graphical environments; but we can't |
| 14 | we can't call it a ``window'' here, because Emacs uses that word in a | 14 | call it a ``window'' here, because Emacs uses that word in a different |
| 15 | different way. In Emacs Lisp, a @dfn{frame object} is a Lisp object | 15 | way. In Emacs Lisp, a @dfn{frame object} is a Lisp object that |
| 16 | that represents a frame on the screen. @xref{Frame Type}. | 16 | represents a frame on the screen. @xref{Frame Type}. |
| 17 | 17 | ||
| 18 | A frame initially contains a single main window and/or a minibuffer | 18 | A frame initially contains a single main window and/or a minibuffer |
| 19 | window; you can subdivide the main window vertically or horizontally | 19 | window; you can subdivide the main window vertically or horizontally |
| 20 | into smaller windows. @xref{Splitting Windows}. | 20 | into smaller windows. @xref{Splitting Windows}. |
| 21 | 21 | ||
| 22 | @cindex terminal | ||
| 22 | A @dfn{terminal} is a display device capable of displaying one or | 23 | A @dfn{terminal} is a display device capable of displaying one or |
| 23 | more Emacs frames. On GNU and Unix systems, Emacs supports any number | 24 | more Emacs frames. In Emacs Lisp, a @dfn{terminal object} is a Lisp |
| 24 | of different terminals in one session, and can mix GUI and text-only | 25 | object that represents a terminal. @xref{Terminal Type}. |
| 25 | frames in the same session. | ||
| 26 | |||
| 27 | Emacs represents each terminal on which it displays frames as a | ||
| 28 | special @dfn{terminal object} data type, see @ref{Terminal Type}. | ||
| 29 | 26 | ||
| 30 | @cindex terminal frame | 27 | @cindex terminal frame |
| 31 | When Emacs runs on a text-only terminal, it starts with one | ||
| 32 | @dfn{terminal frame}. If you create additional frames on the same | ||
| 33 | terminal, Emacs displays one and only one at any given time---on that | ||
| 34 | terminal screen, of course. You can create additional frames, either | ||
| 35 | text-only or GUI, on other terminals from the same Emacs session. | ||
| 36 | (This comes in handy when you connect to the same session from several | ||
| 37 | remote locations.) @xref{Multiple Terminals}. | ||
| 38 | |||
| 39 | @cindex window frame | 28 | @cindex window frame |
| 40 | When Emacs communicates directly with a supported window system, such | 29 | There are two classes of terminals: text-only terminals and |
| 41 | as X, it does not have a terminal frame; instead, it starts with | 30 | graphical terminals. Text-only terminals are non-graphics-capable |
| 42 | a single @dfn{window frame}, but you can create more, and Emacs can | 31 | display devices, including ``terminal emulators'' such as xterm. On |
| 43 | display several such frames at once as is usual for window systems. | 32 | text-only terminals, each frame occupies the entire terminal screen; |
| 33 | although you can create additional frames and switch between them, | ||
| 34 | only one frame can be shown at any given time. We refer to frames on | ||
| 35 | text-only terminals as @dfn{terminal frames}. Graphical terminals, on | ||
| 36 | the other hand, are graphics-capable windowing systems, such as the X | ||
| 37 | Window System. On a graphical terminal, Emacs can display multiple | ||
| 38 | frames simultaneously. We refer to such frames as @dfn{window | ||
| 39 | frames}. | ||
| 40 | |||
| 41 | On GNU and Unix systems, you can create additional frames on any | ||
| 42 | available terminal, within a single Emacs session, regardless of | ||
| 43 | whether Emacs was started on a text-only or graphical terminal. Emacs | ||
| 44 | can display on both graphical and text-only terminals simultaneously. | ||
| 45 | This comes in handy, for instance, when you connect to the same | ||
| 46 | session from several remote locations. @xref{Multiple Terminals}. | ||
| 44 | 47 | ||
| 45 | @defun framep object | 48 | @defun framep object |
| 46 | This predicate returns a non-@code{nil} value if @var{object} is a | 49 | This predicate returns a non-@code{nil} value if @var{object} is a |
| @@ -54,15 +57,17 @@ The frame is displayed in an X window. | |||
| 54 | A terminal frame on a character display. | 57 | A terminal frame on a character display. |
| 55 | @item w32 | 58 | @item w32 |
| 56 | The frame is displayed on MS-Windows 9X/NT. | 59 | The frame is displayed on MS-Windows 9X/NT. |
| 60 | @item ns | ||
| 61 | The frame is displayed on a GNUstep or Macintosh Cocoa display. | ||
| 57 | @item pc | 62 | @item pc |
| 58 | The frame is displayed on an MS-DOS terminal. | 63 | The frame is displayed on an MS-DOS terminal. |
| 59 | @end table | 64 | @end table |
| 60 | @end defun | 65 | @end defun |
| 61 | 66 | ||
| 62 | @defun frame-terminal &optional frame | 67 | @defun frame-terminal &optional frame |
| 63 | This function returns the terminal object (@pxref{Terminal Type}) that | 68 | This function returns the terminal object that displays @var{frame}. |
| 64 | displays @var{frame}. If @var{frame} is @code{nil} or unspecified, it | 69 | If @var{frame} is @code{nil} or unspecified, it defaults to the |
| 65 | defaults to the selected frame. | 70 | selected frame. |
| 66 | @end defun | 71 | @end defun |
| 67 | 72 | ||
| 68 | @defun terminal-live-p object | 73 | @defun terminal-live-p object |
| @@ -75,7 +80,6 @@ is the same as for @code{framep} above. | |||
| 75 | 80 | ||
| 76 | @menu | 81 | @menu |
| 77 | * Creating Frames:: Creating additional frames. | 82 | * Creating Frames:: Creating additional frames. |
| 78 | * Multiple Displays:: Creating frames on other displays. | ||
| 79 | * Multiple Terminals:: Displaying on several different devices. | 83 | * Multiple Terminals:: Displaying on several different devices. |
| 80 | * Frame Parameters:: Controlling frame size, position, font, etc. | 84 | * Frame Parameters:: Controlling frame size, position, font, etc. |
| 81 | * Terminal Parameters:: Parameters common for all frames on terminal. | 85 | * Terminal Parameters:: Parameters common for all frames on terminal. |
| @@ -103,9 +107,6 @@ is the same as for @code{framep} above. | |||
| 103 | * Display Feature Testing:: Determining the features of a terminal. | 107 | * Display Feature Testing:: Determining the features of a terminal. |
| 104 | @end menu | 108 | @end menu |
| 105 | 109 | ||
| 106 | @xref{Display}, for information about the related topic of | ||
| 107 | controlling Emacs redisplay. | ||
| 108 | |||
| 109 | @node Creating Frames | 110 | @node Creating Frames |
| 110 | @section Creating Frames | 111 | @section Creating Frames |
| 111 | 112 | ||
| @@ -113,35 +114,34 @@ To create a new frame, call the function @code{make-frame}. | |||
| 113 | 114 | ||
| 114 | @defun make-frame &optional alist | 115 | @defun make-frame &optional alist |
| 115 | This function creates and returns a new frame, displaying the current | 116 | This function creates and returns a new frame, displaying the current |
| 116 | buffer. If you are using a supported window system, it makes a window | 117 | buffer. |
| 117 | frame; otherwise, it makes a terminal frame. | 118 | |
| 118 | 119 | The @var{alist} argument is an alist that specifies frame parameters | |
| 119 | The argument is an alist specifying frame parameters. Any parameters | 120 | for the new frame. @xref{Frame Parameters}. If you specify the |
| 120 | not mentioned in @var{alist} default according to the value of the | 121 | @code{terminal} parameter in @var{alist}, the new frame is created on |
| 121 | variable @code{default-frame-alist}; parameters not specified even there | 122 | that terminal. Otherwise, if you specify the @code{window-system} |
| 122 | default from the standard X resources or whatever is used instead on | 123 | frame parameter in @var{alist}, that determines whether the frame |
| 123 | your system. | 124 | should be displayed on a text-only or graphical terminal. |
| 124 | 125 | @xref{Window Systems}. If neither is specified, the new frame is | |
| 125 | After the frame is created, this function applies to it the | 126 | created in the same terminal as the selected frame. |
| 126 | parameters, if any, listed in the value of | 127 | |
| 127 | @code{frame-inherited-parameters} (see below) and not present in the | 128 | Any parameters not mentioned in @var{alist} default to the values in |
| 128 | argument, taking the values from the frame that was selected when | 129 | the alist @code{default-frame-alist} (@pxref{Initial Parameters}); |
| 129 | @code{make-frame} was called. | 130 | parameters not specified there default from the X resources or its |
| 130 | 131 | equivalent on your operating system (@pxref{X Resources,, X Resources, | |
| 131 | The set of possible parameters depends in principle on what kind of | 132 | emacs, The GNU Emacs Manual}). After the frame is created, Emacs |
| 132 | window system Emacs uses to display its frames. @xref{Window Frame | 133 | applies any parameters listed in @code{frame-inherited-parameters} |
| 133 | Parameters}, for documentation of individual parameters you can specify. | 134 | (see below) and not present in the argument, taking the values from |
| 135 | the frame that was selected when @code{make-frame} was called. | ||
| 134 | 136 | ||
| 135 | This function itself does not make the new frame the selected frame. | 137 | This function itself does not make the new frame the selected frame. |
| 136 | @xref{Input Focus}. The previously selected frame remains selected. | 138 | @xref{Input Focus}. The previously selected frame remains selected. |
| 137 | However, the window system may select the new frame for its own reasons, | 139 | On graphical terminals, however, the windowing system may select the |
| 138 | for instance if the frame appears under the mouse pointer and your | 140 | new frame for its own reasons. |
| 139 | setup is for focus to follow the pointer. | ||
| 140 | @end defun | 141 | @end defun |
| 141 | 142 | ||
| 142 | @defvar before-make-frame-hook | 143 | @defvar before-make-frame-hook |
| 143 | A normal hook run by @code{make-frame} before it actually creates the | 144 | A normal hook run by @code{make-frame} before it creates the frame. |
| 144 | frame. | ||
| 145 | @end defvar | 145 | @end defvar |
| 146 | 146 | ||
| 147 | @defvar after-make-frame-functions | 147 | @defvar after-make-frame-functions |
| @@ -159,149 +159,164 @@ that parameter in the created frame to its value in the selected | |||
| 159 | frame. | 159 | frame. |
| 160 | @end defvar | 160 | @end defvar |
| 161 | 161 | ||
| 162 | @node Multiple Displays | 162 | @node Multiple Terminals |
| 163 | @section Multiple Displays | 163 | @section Multiple Terminals |
| 164 | @cindex multiple terminals | ||
| 165 | @cindex multi-tty | ||
| 164 | @cindex multiple X displays | 166 | @cindex multiple X displays |
| 165 | @cindex displays, multiple | 167 | @cindex displays, multiple |
| 166 | 168 | ||
| 167 | A single Emacs can talk to more than one X display. | 169 | Emacs represents each terminal, whether graphical or text-only, as a |
| 168 | Initially, Emacs uses just one display---the one chosen with the | 170 | @dfn{terminal object} data type (@pxref{Terminal Type}). On GNU and |
| 169 | @code{DISPLAY} environment variable or with the @samp{--display} option | 171 | Unix systems, Emacs can use multiple terminals simultaneously in each |
| 170 | (@pxref{Initial Options,,, emacs, The GNU Emacs Manual}). To connect to | 172 | session. On other systems, it can only use a single terminal. Each |
| 171 | another display, use the command @code{make-frame-on-display} or specify | 173 | terminal object has the following attributes: |
| 172 | the @code{display} frame parameter when you create the frame. | 174 | |
| 175 | @itemize @bullet | ||
| 176 | @item | ||
| 177 | The name of the device used by the terminal (e.g., @samp{:0.0} or | ||
| 178 | @file{/dev/tty}). | ||
| 179 | |||
| 180 | @item | ||
| 181 | The terminal and keyboard coding systems used on the terminal. | ||
| 182 | @xref{Terminal I/O Encoding}. | ||
| 173 | 183 | ||
| 174 | Emacs treats each X server as a separate terminal, giving each one its | 184 | @item |
| 175 | own selected frame and its own minibuffer windows. However, only one of | 185 | The kind of display associated with the terminal. This is the symbol |
| 176 | those frames is ``@emph{the} selected frame'' at any given moment, see | 186 | returned by the function @code{terminal-live-p} (i.e., @code{x}, |
| 177 | @ref{Input Focus}. | 187 | @code{t}, @code{w32}, @code{ns}, or @code{pc}). @xref{Frames}. |
| 178 | 188 | ||
| 189 | @item | ||
| 190 | A list of terminal parameters. @xref{Terminal Parameters}. | ||
| 191 | @end itemize | ||
| 192 | |||
| 193 | There is no primitive for creating terminal objects. Emacs creates | ||
| 194 | them as needed, such as when you call @code{make-frame-on-display} | ||
| 195 | (which is described below). | ||
| 196 | |||
| 197 | @defun terminal-name &optional terminal | ||
| 198 | This function returns the file name of the device used by | ||
| 199 | @var{terminal}. If @var{terminal} is omitted or @code{nil}, it | ||
| 200 | defaults to the selected frame's terminal. @var{terminal} can also be | ||
| 201 | a frame, meaning that frame's terminal. | ||
| 202 | @end defun | ||
| 203 | |||
| 204 | @defun terminal-list | ||
| 205 | This function returns a list of all terminal objects currently in use. | ||
| 206 | @end defun | ||
| 207 | |||
| 208 | @defun get-device-terminal device | ||
| 209 | This function returns a terminal whose device name is given by | ||
| 210 | @var{device}. If @var{device} is a string, it can be either the file | ||
| 211 | name of a terminal device, or the name of an X display of the form | ||
| 212 | @samp{@var{host}:@var{server}.@var{screen}}. If @var{device} is a | ||
| 213 | frame, this function returns that frame's terminal; @code{nil} means | ||
| 214 | the selected frame. Finally, if @var{device} is a terminal object | ||
| 215 | that represents a live terminal, that terminal is returned. The | ||
| 216 | function signals an error if its argument is none of the above. | ||
| 217 | @end defun | ||
| 218 | |||
| 219 | @defun delete-terminal &optional terminal force | ||
| 220 | This function deletes all frames on @var{terminal} and frees the | ||
| 221 | resources used by it. It runs the abnormal hook | ||
| 222 | @code{delete-terminal-functions}, passing @var{terminal} as the | ||
| 223 | argument to each function. | ||
| 224 | |||
| 225 | If @var{terminal} is omitted or @code{nil}, it defaults to the | ||
| 226 | selected frame's terminal. @var{terminal} can also be a frame, | ||
| 227 | meaning that frame's terminal. | ||
| 228 | |||
| 229 | Normally, this function signals an error if you attempt to delete the | ||
| 230 | sole active terminal, but if @var{force} is non-@code{nil}, you are | ||
| 231 | allowed to do so. Emacs automatically calls this function when the | ||
| 232 | last frame on a terminal is deleted (@pxref{Deleting Frames}). | ||
| 233 | @end defun | ||
| 234 | |||
| 235 | @defvar delete-terminal-functions | ||
| 236 | An abnormal hook run by @code{delete-terminal}. Each function | ||
| 237 | receives one argument, the @var{terminal} argument passed to | ||
| 238 | @code{delete-terminal}. Due to technical details, the functions may | ||
| 239 | be called either just before the terminal is deleted, or just | ||
| 240 | afterwards. | ||
| 241 | @end defvar | ||
| 242 | |||
| 243 | @cindex terminal-local variables | ||
| 179 | A few Lisp variables are @dfn{terminal-local}; that is, they have a | 244 | A few Lisp variables are @dfn{terminal-local}; that is, they have a |
| 180 | separate binding for each terminal. The binding in effect at any time | 245 | separate binding for each terminal. The binding in effect at any time |
| 181 | is the one for the terminal that the currently selected frame belongs | 246 | is the one for the terminal that the currently selected frame belongs |
| 182 | to. These variables include @code{default-minibuffer-frame}, | 247 | to. These variables include @code{default-minibuffer-frame}, |
| 183 | @code{defining-kbd-macro}, @code{last-kbd-macro}, and | 248 | @code{defining-kbd-macro}, @code{last-kbd-macro}, and |
| 184 | @code{system-key-alist}. They are always terminal-local, and can never | 249 | @code{system-key-alist}. They are always terminal-local, and can |
| 185 | be buffer-local (@pxref{Buffer-Local Variables}). | 250 | never be buffer-local (@pxref{Buffer-Local Variables}). |
| 186 | 251 | ||
| 187 | A single X server can handle more than one screen. A display name | 252 | On GNU and Unix systems, each X display is a separate graphical |
| 188 | @samp{@var{host}:@var{server}.@var{screen}} has three parts; the last | 253 | terminal. When Emacs is started from within the X window system, it |
| 189 | part specifies the screen number for a given server. When you use two | 254 | uses the X display chosen with the @code{DISPLAY} environment |
| 190 | screens belonging to one server, Emacs knows by the similarity in their | 255 | variable, or with the @samp{--display} option. @xref{Initial |
| 191 | names that they share a single keyboard, and it treats them as a single | 256 | Options,,, emacs, The GNU Emacs Manual}. Emacs can connect to other X |
| 192 | terminal. | 257 | displays via the command @code{make-frame-on-display}. Each X display |
| 193 | 258 | has its own selected frame and its own minibuffer windows; however, | |
| 194 | Note that some graphical terminals can output to more than a one | 259 | only one of those frames is ``@emph{the} selected frame'' at any given |
| 195 | monitor (or other output device) at the same time. On these | 260 | moment (@pxref{Input Focus}). Emacs can even connect to other |
| 196 | ``multi-monitor'' setups, a single @var{display} value controls the | 261 | text-only terminals, by interacting with the @command{emacsclient} |
| 197 | output to all the physical monitors. In this situation, there is | 262 | program. @xref{Emacs Server,,, emacs, The GNU Emacs Manual}. |
| 198 | currently no platform-independent way for Emacs to distinguish between | 263 | |
| 199 | the different physical monitors. | 264 | A single X server can handle more than one display. Each X display |
| 265 | has a three-part name, @samp{@var{host}:@var{server}.@var{screen}}. | ||
| 266 | The first two parts, @var{host} and @var{server}, identify the X | ||
| 267 | server; the third part, @var{screen}, identifies a screen number on | ||
| 268 | that X server. When you use two or more screens belonging to one | ||
| 269 | server, Emacs knows by the similarity in their names that they share a | ||
| 270 | single keyboard. | ||
| 271 | |||
| 272 | On some ``multi-monitor'' setups, a single X display outputs to more | ||
| 273 | than one monitor. Currently, there is no way for Emacs to distinguish | ||
| 274 | between the different physical monitors. | ||
| 200 | 275 | ||
| 201 | @deffn Command make-frame-on-display display &optional parameters | 276 | @deffn Command make-frame-on-display display &optional parameters |
| 202 | This creates and returns a new frame on display @var{display}, taking | 277 | This function creates and returns a new frame on @var{display}, taking |
| 203 | the other frame parameters from @var{parameters}. Aside from the | 278 | the other frame parameters from the alist @var{parameters}. |
| 204 | @var{display} argument, it is like @code{make-frame} (@pxref{Creating | 279 | @var{display} should be the name of an X display (a string). |
| 205 | Frames}). | 280 | |
| 281 | Before creating the frame, this function ensures that Emacs is ``set | ||
| 282 | up'' to display graphics. For instance, if Emacs has not processed X | ||
| 283 | resources (e.g., if it was started on a text-only terminal), it does | ||
| 284 | so at this time. In all other respects, this function behaves like | ||
| 285 | @code{make-frame} (@pxref{Creating Frames}). | ||
| 206 | @end deffn | 286 | @end deffn |
| 207 | 287 | ||
| 208 | @defun x-display-list | 288 | @defun x-display-list |
| 209 | This returns a list that indicates which X displays Emacs has a | 289 | This function returns a list that indicates which X displays Emacs has |
| 210 | connection to. The elements of the list are strings, and each one is | 290 | a connection to. The elements of the list are strings, and each one |
| 211 | a display name. | 291 | is a display name. |
| 212 | @end defun | 292 | @end defun |
| 213 | 293 | ||
| 214 | @defun x-open-connection display &optional xrm-string must-succeed | 294 | @defun x-open-connection display &optional xrm-string must-succeed |
| 215 | This function opens a connection to the X display @var{display}. It | 295 | This function opens a connection to the X display @var{display}, |
| 216 | does not create a frame on that display, but it permits you to check | 296 | without creating a frame on that display. Normally, Emacs Lisp |
| 217 | that communication can be established with that display. | 297 | programs need not call this function, as @code{make-frame-on-display} |
| 218 | 298 | calls it automatically. The only reason for calling it is to check | |
| 219 | The optional argument @var{xrm-string}, if not @code{nil}, is a | 299 | whether communication can be established with a given X display. |
| 220 | string of resource names and values, in the same format used in the | 300 | |
| 221 | @file{.Xresources} file. The values you specify override the resource | 301 | The optional argument @var{xrm-string}, if not @code{nil}, is a string |
| 222 | values recorded in the X server itself; they apply to all Emacs frames | 302 | of resource names and values, in the same format used in the |
| 223 | created on this display. Here's an example of what this string might | 303 | @file{.Xresources} file. @xref{X Resources,, X Resources, emacs, The |
| 224 | look like: | 304 | GNU Emacs Manual}. These values apply to all Emacs frames created on |
| 305 | this display, overriding the resource values recorded in the X server. | ||
| 306 | Here's an example of what this string might look like: | ||
| 225 | 307 | ||
| 226 | @example | 308 | @example |
| 227 | "*BorderWidth: 3\n*InternalBorder: 2\n" | 309 | "*BorderWidth: 3\n*InternalBorder: 2\n" |
| 228 | @end example | 310 | @end example |
| 229 | 311 | ||
| 230 | @xref{X Resources,, X Resources, emacs, The GNU Emacs Manual}. | ||
| 231 | |||
| 232 | If @var{must-succeed} is non-@code{nil}, failure to open the connection | 312 | If @var{must-succeed} is non-@code{nil}, failure to open the connection |
| 233 | terminates Emacs. Otherwise, it is an ordinary Lisp error. | 313 | terminates Emacs. Otherwise, it is an ordinary Lisp error. |
| 234 | @end defun | 314 | @end defun |
| 235 | 315 | ||
| 236 | @defun x-close-connection display | 316 | @defun x-close-connection display |
| 237 | This function closes the connection to display @var{display}. Before | 317 | This function closes the connection to display @var{display}. Before |
| 238 | you can do this, you must first delete all the frames that were open on | 318 | you can do this, you must first delete all the frames that were open |
| 239 | that display (@pxref{Deleting Frames}). | 319 | on that display (@pxref{Deleting Frames}). |
| 240 | @end defun | ||
| 241 | |||
| 242 | @node Multiple Terminals | ||
| 243 | @section Multiple Terminals | ||
| 244 | @cindex multiple terminals | ||
| 245 | @cindex multi-tty | ||
| 246 | |||
| 247 | Emacs represents each terminal on which it displays frames as a | ||
| 248 | special @dfn{terminal object} data type, see @ref{Terminal Type}. The | ||
| 249 | terminal object has the following attributes: | ||
| 250 | |||
| 251 | @itemize @bullet | ||
| 252 | @item | ||
| 253 | The name of the device used by the terminal (e.g., @file{/dev/tty}). | ||
| 254 | |||
| 255 | @item | ||
| 256 | The terminal and keyboard coding systems (@pxref{Terminal I/O | ||
| 257 | Encoding}) used on the terminal. | ||
| 258 | |||
| 259 | @item | ||
| 260 | The kind of frames (@pxref{Frames}) the terminal is displaying. | ||
| 261 | |||
| 262 | @item | ||
| 263 | A list of the terminal parameters (@pxref{Terminal Parameters}). | ||
| 264 | @end itemize | ||
| 265 | |||
| 266 | There's no primitive for creating terminal objects; Emacs creates | ||
| 267 | them as needed when you call one of the primitives, such as | ||
| 268 | @code{make-frame-on-tty} (@pxref{Multiple Displays}), that start | ||
| 269 | displaying on a new terminal. | ||
| 270 | |||
| 271 | @defun terminal-list | ||
| 272 | This function return the list of all the terminal objects used by | ||
| 273 | Emacs to display frames in this session. | ||
| 274 | @end defun | ||
| 275 | |||
| 276 | @defun delete-terminal &optional terminal force | ||
| 277 | This function deletes all frames on @var{terminal} and frees the | ||
| 278 | resources used by it. @var{terminal} can be a terminal object, a | ||
| 279 | frame (meaning that frame's terminal), or @code{nil} (meaning the | ||
| 280 | selected frame's terminal). Normally, the function signals an error | ||
| 281 | if you attempt to delete the sole active terminal, but if @var{force} | ||
| 282 | is non-@code{nil}, you are allowed to do so. This function runs the | ||
| 283 | hook @code{delete-terminal-functions}, passing each function a single | ||
| 284 | argument, @var{terminal}. | ||
| 285 | @end defun | ||
| 286 | |||
| 287 | @defun terminal-name &optional terminal | ||
| 288 | This function returns the file name of the device used by | ||
| 289 | @var{terminal}. If @var{terminal} is omitted or @code{nil}, it | ||
| 290 | defaults to the selected frame's terminal. @var{terminal} can also be | ||
| 291 | a frame, meaning that frame's terminal. | ||
| 292 | @end defun | ||
| 293 | |||
| 294 | @defun get-device-terminal device | ||
| 295 | This function is in a sense the opposite of @code{terminal-name}: it | ||
| 296 | returns a terminal whose device name is given by @var{device}. If | ||
| 297 | @var{device} is a string, it can be either the file name of a terminal | ||
| 298 | device or the name of an X display of the form | ||
| 299 | @samp{@var{host}:@var{server}.@var{screen}} (@pxref{Multiple | ||
| 300 | Displays}). If @var{device} is a frame, this function returns that | ||
| 301 | frame's terminal; @code{nil} means the selected frame. Finally, if | ||
| 302 | @var{device} is a terminal object that represents a live terminal, | ||
| 303 | that terminal is returned. The function signals an error if its | ||
| 304 | argument is none of the above. | ||
| 305 | @end defun | 320 | @end defun |
| 306 | 321 | ||
| 307 | @node Frame Parameters | 322 | @node Frame Parameters |
| @@ -852,10 +867,10 @@ completely opaque. It can also have a @code{nil} value, which tells | |||
| 852 | Emacs not to set the frame opacity (leaving it to the window manager). | 867 | Emacs not to set the frame opacity (leaving it to the window manager). |
| 853 | 868 | ||
| 854 | To prevent the frame from disappearing completely from view, the | 869 | To prevent the frame from disappearing completely from view, the |
| 855 | variable @var{frame-alpha-lower-limit} defines a lower opacity limit. | 870 | variable @code{frame-alpha-lower-limit} defines a lower opacity limit. |
| 856 | If the value of the frame parameter is less than the value of this | 871 | If the value of the frame parameter is less than the value of this |
| 857 | variable, Emacs uses the latter. By default, | 872 | variable, Emacs uses the latter. By default, |
| 858 | @var{frame-alpha-lower-limit} is 20. | 873 | @code{frame-alpha-lower-limit} is 20. |
| 859 | 874 | ||
| 860 | The @code{alpha} frame parameter can also be a cons cell | 875 | The @code{alpha} frame parameter can also be a cons cell |
| 861 | @code{(@samp{active} . @samp{inactive})}, where @samp{active} is the | 876 | @code{(@samp{active} . @samp{inactive})}, where @samp{active} is the |
| @@ -1278,7 +1293,7 @@ when you enter the minibuffer. If so, set the variable | |||
| 1278 | This variable specifies the frame to use for the minibuffer window, by | 1293 | This variable specifies the frame to use for the minibuffer window, by |
| 1279 | default. It does not affect existing frames. It is always local to | 1294 | default. It does not affect existing frames. It is always local to |
| 1280 | the current terminal and cannot be buffer-local. @xref{Multiple | 1295 | the current terminal and cannot be buffer-local. @xref{Multiple |
| 1281 | Displays}. | 1296 | Terminals}. |
| 1282 | @end defvar | 1297 | @end defvar |
| 1283 | 1298 | ||
| 1284 | @node Input Focus | 1299 | @node Input Focus |
| @@ -1290,15 +1305,15 @@ At any time, one frame in Emacs is the @dfn{selected frame}. The selected | |||
| 1290 | window always resides on the selected frame. | 1305 | window always resides on the selected frame. |
| 1291 | 1306 | ||
| 1292 | When Emacs displays its frames on several terminals (@pxref{Multiple | 1307 | When Emacs displays its frames on several terminals (@pxref{Multiple |
| 1293 | Displays}), each terminal has its own selected frame. But only one of | 1308 | Terminals}), each terminal has its own selected frame. But only one |
| 1294 | these is ``@emph{the} selected frame'': it's the frame that belongs to | 1309 | of these is ``@emph{the} selected frame'': it's the frame that belongs |
| 1295 | the terminal from which the most recent input came. That is, when Emacs | 1310 | to the terminal from which the most recent input came. That is, when |
| 1296 | runs a command that came from a certain terminal, the selected frame is | 1311 | Emacs runs a command that came from a certain terminal, the selected |
| 1297 | the one of that terminal. Since Emacs runs only a single command at any | 1312 | frame is the one of that terminal. Since Emacs runs only a single |
| 1298 | given time, it needs to consider only one selected frame at a time; this | 1313 | command at any given time, it needs to consider only one selected |
| 1299 | frame is what we call @dfn{the selected frame} in this manual. The | 1314 | frame at a time; this frame is what we call @dfn{the selected frame} |
| 1300 | display on which the selected frame is shown is the @dfn{selected | 1315 | in this manual. The display on which the selected frame is shown is |
| 1301 | frame's display}. | 1316 | the @dfn{selected frame's display}. |
| 1302 | 1317 | ||
| 1303 | @defun selected-frame | 1318 | @defun selected-frame |
| 1304 | This function returns the selected frame. | 1319 | This function returns the selected frame. |
| @@ -2285,7 +2300,7 @@ On a character terminal, it gives the height in characters. | |||
| 2285 | 2300 | ||
| 2286 | For graphical terminals, note that on ``multi-monitor'' setups this | 2301 | For graphical terminals, note that on ``multi-monitor'' setups this |
| 2287 | refers to the pixel width for all physical monitors associated with | 2302 | refers to the pixel width for all physical monitors associated with |
| 2288 | @var{display}. @xref{Multiple Displays}. | 2303 | @var{display}. @xref{Multiple Terminals}. |
| 2289 | @end defun | 2304 | @end defun |
| 2290 | 2305 | ||
| 2291 | @defun display-pixel-width &optional display | 2306 | @defun display-pixel-width &optional display |
| @@ -2294,7 +2309,7 @@ On a character terminal, it gives the width in characters. | |||
| 2294 | 2309 | ||
| 2295 | For graphical terminals, note that on ``multi-monitor'' setups this | 2310 | For graphical terminals, note that on ``multi-monitor'' setups this |
| 2296 | refers to the pixel width for all physical monitors associated with | 2311 | refers to the pixel width for all physical monitors associated with |
| 2297 | @var{display}. @xref{Multiple Displays}. | 2312 | @var{display}. @xref{Multiple Terminals}. |
| 2298 | @end defun | 2313 | @end defun |
| 2299 | 2314 | ||
| 2300 | @defun display-mm-height &optional display | 2315 | @defun display-mm-height &optional display |
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index b6273e592b9..6d4c95fca3d 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -898,7 +898,7 @@ If non-@code{nil}, this variable holds a keymap to use instead of | |||
| 898 | or overlay keymaps, and all the minor mode keymaps. | 898 | or overlay keymaps, and all the minor mode keymaps. |
| 899 | 899 | ||
| 900 | This variable is always local to the current terminal and cannot be | 900 | This variable is always local to the current terminal and cannot be |
| 901 | buffer-local. @xref{Multiple Displays}. It is used to implement | 901 | buffer-local. @xref{Multiple Terminals}. It is used to implement |
| 902 | incremental search mode. | 902 | incremental search mode. |
| 903 | @end defvar | 903 | @end defvar |
| 904 | 904 | ||
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 2e37afe94a6..c5f0bdb6ffa 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -2071,7 +2071,7 @@ servers; those do no harm, as long as they don't conflict with the ones | |||
| 2071 | used by the X server actually in use. | 2071 | used by the X server actually in use. |
| 2072 | 2072 | ||
| 2073 | The variable is always local to the current terminal, and cannot be | 2073 | The variable is always local to the current terminal, and cannot be |
| 2074 | buffer-local. @xref{Multiple Displays}. | 2074 | buffer-local. @xref{Multiple Terminals}. |
| 2075 | @end defvar | 2075 | @end defvar |
| 2076 | 2076 | ||
| 2077 | You can specify which keysyms Emacs should use for the Meta, Alt, Hyper, and Super modifiers by setting these variables: | 2077 | You can specify which keysyms Emacs should use for the Meta, Alt, Hyper, and Super modifiers by setting these variables: |
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 592279d0110..2f97c8c0b5b 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi | |||
| @@ -256,7 +256,7 @@ Macro calls (@pxref{Macros}). | |||
| 256 | 256 | ||
| 257 | Variables can also have buffer-local bindings (@pxref{Buffer-Local | 257 | Variables can also have buffer-local bindings (@pxref{Buffer-Local |
| 258 | Variables}); a few variables have terminal-local bindings | 258 | Variables}); a few variables have terminal-local bindings |
| 259 | (@pxref{Multiple Displays}). These kinds of bindings work somewhat | 259 | (@pxref{Multiple Terminals}). These kinds of bindings work somewhat |
| 260 | like ordinary local bindings, but they are localized depending on | 260 | like ordinary local bindings, but they are localized depending on |
| 261 | ``where'' you are in Emacs, rather than localized in time. | 261 | ``where'' you are in Emacs, rather than localized in time. |
| 262 | 262 | ||
| @@ -1091,7 +1091,7 @@ additional, unusual kinds of variable binding, such as | |||
| 1091 | @dfn{buffer-local} bindings, which apply only in one buffer. Having | 1091 | @dfn{buffer-local} bindings, which apply only in one buffer. Having |
| 1092 | different values for a variable in different buffers is an important | 1092 | different values for a variable in different buffers is an important |
| 1093 | customization method. (Variables can also have bindings that are | 1093 | customization method. (Variables can also have bindings that are |
| 1094 | local to each terminal, or to each frame. @xref{Multiple Displays}, | 1094 | local to each terminal, or to each frame. @xref{Multiple Terminals}, |
| 1095 | and @xref{Frame-Local Variables}.) | 1095 | and @xref{Frame-Local Variables}.) |
| 1096 | 1096 | ||
| 1097 | @menu | 1097 | @menu |
| @@ -1193,7 +1193,7 @@ GNU Emacs Manual}. | |||
| 1193 | 1193 | ||
| 1194 | A buffer-local variable cannot be made frame-local | 1194 | A buffer-local variable cannot be made frame-local |
| 1195 | (@pxref{Frame-Local Variables}) or terminal-local (@pxref{Multiple | 1195 | (@pxref{Frame-Local Variables}) or terminal-local (@pxref{Multiple |
| 1196 | Displays}). | 1196 | Terminals}). |
| 1197 | 1197 | ||
| 1198 | @node Creating Buffer-Local | 1198 | @node Creating Buffer-Local |
| 1199 | @subsection Creating and Deleting Buffer-Local Bindings | 1199 | @subsection Creating and Deleting Buffer-Local Bindings |
| @@ -1245,7 +1245,7 @@ is not current either on entry to or exit from the @code{let}. This is | |||
| 1245 | because @code{let} does not distinguish between different kinds of | 1245 | because @code{let} does not distinguish between different kinds of |
| 1246 | bindings; it knows only which variable the binding was made for. | 1246 | bindings; it knows only which variable the binding was made for. |
| 1247 | 1247 | ||
| 1248 | If the variable is terminal-local (@pxref{Multiple Displays}), or | 1248 | If the variable is terminal-local (@pxref{Multiple Terminals}), or |
| 1249 | frame-local (@pxref{Frame-Local Variables}), this function signals an | 1249 | frame-local (@pxref{Frame-Local Variables}), this function signals an |
| 1250 | error. Such variables cannot have buffer-local bindings as well. | 1250 | error. Such variables cannot have buffer-local bindings as well. |
| 1251 | 1251 | ||
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index 94220358b26..428a238d797 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi | |||
| @@ -948,7 +948,7 @@ Windows | |||
| 948 | Frames | 948 | Frames |
| 949 | 949 | ||
| 950 | * Creating Frames:: Creating additional frames. | 950 | * Creating Frames:: Creating additional frames. |
| 951 | * Multiple Displays:: Creating frames on other displays. | 951 | * Multiple Terminals:: Creating frames on other displays. |
| 952 | * Frame Parameters:: Controlling frame size, position, font, etc. | 952 | * Frame Parameters:: Controlling frame size, position, font, etc. |
| 953 | * Frame Titles:: Automatic updating of frame titles. | 953 | * Frame Titles:: Automatic updating of frame titles. |
| 954 | * Deleting Frames:: Frames last until explicitly deleted. | 954 | * Deleting Frames:: Frames last until explicitly deleted. |
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 1898ed1ba13..5af4919992e 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi | |||
| @@ -947,7 +947,7 @@ Windows | |||
| 947 | Frames | 947 | Frames |
| 948 | 948 | ||
| 949 | * Creating Frames:: Creating additional frames. | 949 | * Creating Frames:: Creating additional frames. |
| 950 | * Multiple Displays:: Creating frames on other displays. | 950 | * Multiple Terminals:: Creating frames on other displays. |
| 951 | * Frame Parameters:: Controlling frame size, position, font, etc. | 951 | * Frame Parameters:: Controlling frame size, position, font, etc. |
| 952 | * Frame Titles:: Automatic updating of frame titles. | 952 | * Frame Titles:: Automatic updating of frame titles. |
| 953 | * Deleting Frames:: Frames last until explicitly deleted. | 953 | * Deleting Frames:: Frames last until explicitly deleted. |