aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-04-04 22:34:23 +0000
committerChong Yidong2009-04-04 22:34:23 +0000
commit3ec61d4e52d0b77e760331853878ab303141e125 (patch)
treeee0e31323f541be9de4827f655f169ff5234e02f
parente173bbce451a12940bd8399f7f8a9b9b310f7007 (diff)
downloademacs-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/ChangeLog21
-rw-r--r--doc/lispref/commands.texi6
-rw-r--r--doc/lispref/elisp.texi3
-rw-r--r--doc/lispref/frames.texi379
-rw-r--r--doc/lispref/keymaps.texi2
-rw-r--r--doc/lispref/os.texi2
-rw-r--r--doc/lispref/variables.texi8
-rw-r--r--doc/lispref/vol1.texi2
-rw-r--r--doc/lispref/vol2.texi2
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 @@
12009-04-04 Chong Yidong <cyd@stupidchicken.com> 12009-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
781argument for the following command. 781argument for the following command.
782 782
783This variable is always local to the current terminal and cannot be 783This variable is always local to the current terminal and cannot be
784buffer-local. @xref{Multiple Displays}. 784buffer-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
3342The variable is always local to the current terminal and cannot be 3342The variable is always local to the current terminal and cannot be
3343buffer-local. @xref{Multiple Displays}. 3343buffer-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
3348macro. Its value is a string or vector, or @code{nil}. 3348macro. Its value is a string or vector, or @code{nil}.
3349 3349
3350The variable is always local to the current terminal and cannot be 3350The variable is always local to the current terminal and cannot be
3351buffer-local. @xref{Multiple Displays}. 3351buffer-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
938Frames 938Frames
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
12or more Emacs windows, see @ref{Windows}. It's the kind of object that 12windows (@pxref{Windows}). It is the kind of object called a
13is called a ``window'' in the terminology of graphical environments; but 13``window'' in the terminology of graphical environments; but we can't
14we can't call it a ``window'' here, because Emacs uses that word in a 14call it a ``window'' here, because Emacs uses that word in a different
15different way. In Emacs Lisp, a @dfn{frame object} is a Lisp object 15way. In Emacs Lisp, a @dfn{frame object} is a Lisp object that
16that represents a frame on the screen. @xref{Frame Type}. 16represents 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
19window; you can subdivide the main window vertically or horizontally 19window; you can subdivide the main window vertically or horizontally
20into smaller windows. @xref{Splitting Windows}. 20into 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
23more Emacs frames. On GNU and Unix systems, Emacs supports any number 24more Emacs frames. In Emacs Lisp, a @dfn{terminal object} is a Lisp
24of different terminals in one session, and can mix GUI and text-only 25object that represents a terminal. @xref{Terminal Type}.
25frames in the same session.
26
27 Emacs represents each terminal on which it displays frames as a
28special @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
33terminal, Emacs displays one and only one at any given time---on that
34terminal screen, of course. You can create additional frames, either
35text-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
37remote 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
41as X, it does not have a terminal frame; instead, it starts with 30graphical terminals. Text-only terminals are non-graphics-capable
42a single @dfn{window frame}, but you can create more, and Emacs can 31display devices, including ``terminal emulators'' such as xterm. On
43display several such frames at once as is usual for window systems. 32text-only terminals, each frame occupies the entire terminal screen;
33although you can create additional frames and switch between them,
34only one frame can be shown at any given time. We refer to frames on
35text-only terminals as @dfn{terminal frames}. Graphical terminals, on
36the other hand, are graphics-capable windowing systems, such as the X
37Window System. On a graphical terminal, Emacs can display multiple
38frames simultaneously. We refer to such frames as @dfn{window
39frames}.
40
41 On GNU and Unix systems, you can create additional frames on any
42available terminal, within a single Emacs session, regardless of
43whether Emacs was started on a text-only or graphical terminal. Emacs
44can display on both graphical and text-only terminals simultaneously.
45This comes in handy, for instance, when you connect to the same
46session from several remote locations. @xref{Multiple Terminals}.
44 47
45@defun framep object 48@defun framep object
46This predicate returns a non-@code{nil} value if @var{object} is a 49This predicate returns a non-@code{nil} value if @var{object} is a
@@ -54,15 +57,17 @@ The frame is displayed in an X window.
54A terminal frame on a character display. 57A terminal frame on a character display.
55@item w32 58@item w32
56The frame is displayed on MS-Windows 9X/NT. 59The frame is displayed on MS-Windows 9X/NT.
60@item ns
61The frame is displayed on a GNUstep or Macintosh Cocoa display.
57@item pc 62@item pc
58The frame is displayed on an MS-DOS terminal. 63The 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
63This function returns the terminal object (@pxref{Terminal Type}) that 68This function returns the terminal object that displays @var{frame}.
64displays @var{frame}. If @var{frame} is @code{nil} or unspecified, it 69If @var{frame} is @code{nil} or unspecified, it defaults to the
65defaults to the selected frame. 70selected 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
107controlling 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
115This function creates and returns a new frame, displaying the current 116This function creates and returns a new frame, displaying the current
116buffer. If you are using a supported window system, it makes a window 117buffer.
117frame; otherwise, it makes a terminal frame. 118
118 119The @var{alist} argument is an alist that specifies frame parameters
119The argument is an alist specifying frame parameters. Any parameters 120for the new frame. @xref{Frame Parameters}. If you specify the
120not mentioned in @var{alist} default according to the value of the 121@code{terminal} parameter in @var{alist}, the new frame is created on
121variable @code{default-frame-alist}; parameters not specified even there 122that terminal. Otherwise, if you specify the @code{window-system}
122default from the standard X resources or whatever is used instead on 123frame parameter in @var{alist}, that determines whether the frame
123your system. 124should be displayed on a text-only or graphical terminal.
124 125@xref{Window Systems}. If neither is specified, the new frame is
125After the frame is created, this function applies to it the 126created in the same terminal as the selected frame.
126parameters, if any, listed in the value of 127
127@code{frame-inherited-parameters} (see below) and not present in the 128Any parameters not mentioned in @var{alist} default to the values in
128argument, taking the values from the frame that was selected when 129the alist @code{default-frame-alist} (@pxref{Initial Parameters});
129@code{make-frame} was called. 130parameters not specified there default from the X resources or its
130 131equivalent on your operating system (@pxref{X Resources,, X Resources,
131The set of possible parameters depends in principle on what kind of 132emacs, The GNU Emacs Manual}). After the frame is created, Emacs
132window system Emacs uses to display its frames. @xref{Window Frame 133applies any parameters listed in @code{frame-inherited-parameters}
133Parameters}, for documentation of individual parameters you can specify. 134(see below) and not present in the argument, taking the values from
135the frame that was selected when @code{make-frame} was called.
134 136
135This function itself does not make the new frame the selected frame. 137This 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.
137However, the window system may select the new frame for its own reasons, 139On graphical terminals, however, the windowing system may select the
138for instance if the frame appears under the mouse pointer and your 140new frame for its own reasons.
139setup 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
143A normal hook run by @code{make-frame} before it actually creates the 144A normal hook run by @code{make-frame} before it creates the frame.
144frame.
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
159frame. 159frame.
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
168Initially, 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 171Unix systems, Emacs can use multiple terminals simultaneously in each
170(@pxref{Initial Options,,, emacs, The GNU Emacs Manual}). To connect to 172session. On other systems, it can only use a single terminal. Each
171another display, use the command @code{make-frame-on-display} or specify 173terminal object has the following attributes:
172the @code{display} frame parameter when you create the frame. 174
175@itemize @bullet
176@item
177The name of the device used by the terminal (e.g., @samp{:0.0} or
178@file{/dev/tty}).
179
180@item
181The 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
175own selected frame and its own minibuffer windows. However, only one of 185The kind of display associated with the terminal. This is the symbol
176those frames is ``@emph{the} selected frame'' at any given moment, see 186returned 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
190A list of terminal parameters. @xref{Terminal Parameters}.
191@end itemize
192
193 There is no primitive for creating terminal objects. Emacs creates
194them as needed, such as when you call @code{make-frame-on-display}
195(which is described below).
196
197@defun terminal-name &optional terminal
198This function returns the file name of the device used by
199@var{terminal}. If @var{terminal} is omitted or @code{nil}, it
200defaults to the selected frame's terminal. @var{terminal} can also be
201a frame, meaning that frame's terminal.
202@end defun
203
204@defun terminal-list
205This function returns a list of all terminal objects currently in use.
206@end defun
207
208@defun get-device-terminal device
209This 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
211name 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
213frame, this function returns that frame's terminal; @code{nil} means
214the selected frame. Finally, if @var{device} is a terminal object
215that represents a live terminal, that terminal is returned. The
216function signals an error if its argument is none of the above.
217@end defun
218
219@defun delete-terminal &optional terminal force
220This function deletes all frames on @var{terminal} and frees the
221resources used by it. It runs the abnormal hook
222@code{delete-terminal-functions}, passing @var{terminal} as the
223argument to each function.
224
225If @var{terminal} is omitted or @code{nil}, it defaults to the
226selected frame's terminal. @var{terminal} can also be a frame,
227meaning that frame's terminal.
228
229Normally, this function signals an error if you attempt to delete the
230sole active terminal, but if @var{force} is non-@code{nil}, you are
231allowed to do so. Emacs automatically calls this function when the
232last frame on a terminal is deleted (@pxref{Deleting Frames}).
233@end defun
234
235@defvar delete-terminal-functions
236An abnormal hook run by @code{delete-terminal}. Each function
237receives one argument, the @var{terminal} argument passed to
238@code{delete-terminal}. Due to technical details, the functions may
239be called either just before the terminal is deleted, or just
240afterwards.
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
180separate binding for each terminal. The binding in effect at any time 245separate binding for each terminal. The binding in effect at any time
181is the one for the terminal that the currently selected frame belongs 246is the one for the terminal that the currently selected frame belongs
182to. These variables include @code{default-minibuffer-frame}, 247to. 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
185be buffer-local (@pxref{Buffer-Local Variables}). 250never 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 253terminal. When Emacs is started from within the X window system, it
189part specifies the screen number for a given server. When you use two 254uses the X display chosen with the @code{DISPLAY} environment
190screens belonging to one server, Emacs knows by the similarity in their 255variable, or with the @samp{--display} option. @xref{Initial
191names that they share a single keyboard, and it treats them as a single 256Options,,, emacs, The GNU Emacs Manual}. Emacs can connect to other X
192terminal. 257displays via the command @code{make-frame-on-display}. Each X display
193 258has its own selected frame and its own minibuffer windows; however,
194 Note that some graphical terminals can output to more than a one 259only one of those frames is ``@emph{the} selected frame'' at any given
195monitor (or other output device) at the same time. On these 260moment (@pxref{Input Focus}). Emacs can even connect to other
196``multi-monitor'' setups, a single @var{display} value controls the 261text-only terminals, by interacting with the @command{emacsclient}
197output to all the physical monitors. In this situation, there is 262program. @xref{Emacs Server,,, emacs, The GNU Emacs Manual}.
198currently no platform-independent way for Emacs to distinguish between 263
199the different physical monitors. 264 A single X server can handle more than one display. Each X display
265has a three-part name, @samp{@var{host}:@var{server}.@var{screen}}.
266The first two parts, @var{host} and @var{server}, identify the X
267server; the third part, @var{screen}, identifies a screen number on
268that X server. When you use two or more screens belonging to one
269server, Emacs knows by the similarity in their names that they share a
270single keyboard.
271
272 On some ``multi-monitor'' setups, a single X display outputs to more
273than one monitor. Currently, there is no way for Emacs to distinguish
274between 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
202This creates and returns a new frame on display @var{display}, taking 277This function creates and returns a new frame on @var{display}, taking
203the other frame parameters from @var{parameters}. Aside from the 278the 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).
205Frames}). 280
281Before creating the frame, this function ensures that Emacs is ``set
282up'' to display graphics. For instance, if Emacs has not processed X
283resources (e.g., if it was started on a text-only terminal), it does
284so 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
209This returns a list that indicates which X displays Emacs has a 289This function returns a list that indicates which X displays Emacs has
210connection to. The elements of the list are strings, and each one is 290a connection to. The elements of the list are strings, and each one
211a display name. 291is 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
215This function opens a connection to the X display @var{display}. It 295This function opens a connection to the X display @var{display},
216does not create a frame on that display, but it permits you to check 296without creating a frame on that display. Normally, Emacs Lisp
217that communication can be established with that display. 297programs need not call this function, as @code{make-frame-on-display}
218 298calls it automatically. The only reason for calling it is to check
219The optional argument @var{xrm-string}, if not @code{nil}, is a 299whether communication can be established with a given X display.
220string of resource names and values, in the same format used in the 300
221@file{.Xresources} file. The values you specify override the resource 301The optional argument @var{xrm-string}, if not @code{nil}, is a string
222values recorded in the X server itself; they apply to all Emacs frames 302of resource names and values, in the same format used in the
223created on this display. Here's an example of what this string might 303@file{.Xresources} file. @xref{X Resources,, X Resources, emacs, The
224look like: 304GNU Emacs Manual}. These values apply to all Emacs frames created on
305this display, overriding the resource values recorded in the X server.
306Here'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
232If @var{must-succeed} is non-@code{nil}, failure to open the connection 312If @var{must-succeed} is non-@code{nil}, failure to open the connection
233terminates Emacs. Otherwise, it is an ordinary Lisp error. 313terminates 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
237This function closes the connection to display @var{display}. Before 317This function closes the connection to display @var{display}. Before
238you can do this, you must first delete all the frames that were open on 318you can do this, you must first delete all the frames that were open
239that display (@pxref{Deleting Frames}). 319on 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
248special @dfn{terminal object} data type, see @ref{Terminal Type}. The
249terminal object has the following attributes:
250
251@itemize @bullet
252@item
253The name of the device used by the terminal (e.g., @file{/dev/tty}).
254
255@item
256The terminal and keyboard coding systems (@pxref{Terminal I/O
257Encoding}) used on the terminal.
258
259@item
260The kind of frames (@pxref{Frames}) the terminal is displaying.
261
262@item
263A list of the terminal parameters (@pxref{Terminal Parameters}).
264@end itemize
265
266 There's no primitive for creating terminal objects; Emacs creates
267them as needed when you call one of the primitives, such as
268@code{make-frame-on-tty} (@pxref{Multiple Displays}), that start
269displaying on a new terminal.
270
271@defun terminal-list
272This function return the list of all the terminal objects used by
273Emacs to display frames in this session.
274@end defun
275
276@defun delete-terminal &optional terminal force
277This function deletes all frames on @var{terminal} and frees the
278resources used by it. @var{terminal} can be a terminal object, a
279frame (meaning that frame's terminal), or @code{nil} (meaning the
280selected frame's terminal). Normally, the function signals an error
281if you attempt to delete the sole active terminal, but if @var{force}
282is non-@code{nil}, you are allowed to do so. This function runs the
283hook @code{delete-terminal-functions}, passing each function a single
284argument, @var{terminal}.
285@end defun
286
287@defun terminal-name &optional terminal
288This function returns the file name of the device used by
289@var{terminal}. If @var{terminal} is omitted or @code{nil}, it
290defaults to the selected frame's terminal. @var{terminal} can also be
291a frame, meaning that frame's terminal.
292@end defun
293
294@defun get-device-terminal device
295This function is in a sense the opposite of @code{terminal-name}: it
296returns 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
298device or the name of an X display of the form
299@samp{@var{host}:@var{server}.@var{screen}} (@pxref{Multiple
300Displays}). If @var{device} is a frame, this function returns that
301frame's terminal; @code{nil} means the selected frame. Finally, if
302@var{device} is a terminal object that represents a live terminal,
303that terminal is returned. The function signals an error if its
304argument 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
852Emacs not to set the frame opacity (leaving it to the window manager). 867Emacs not to set the frame opacity (leaving it to the window manager).
853 868
854To prevent the frame from disappearing completely from view, the 869To prevent the frame from disappearing completely from view, the
855variable @var{frame-alpha-lower-limit} defines a lower opacity limit. 870variable @code{frame-alpha-lower-limit} defines a lower opacity limit.
856If the value of the frame parameter is less than the value of this 871If the value of the frame parameter is less than the value of this
857variable, Emacs uses the latter. By default, 872variable, Emacs uses the latter. By default,
858@var{frame-alpha-lower-limit} is 20. 873@code{frame-alpha-lower-limit} is 20.
859 874
860The @code{alpha} frame parameter can also be a cons cell 875The @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
1278This variable specifies the frame to use for the minibuffer window, by 1293This variable specifies the frame to use for the minibuffer window, by
1279default. It does not affect existing frames. It is always local to 1294default. It does not affect existing frames. It is always local to
1280the current terminal and cannot be buffer-local. @xref{Multiple 1295the current terminal and cannot be buffer-local. @xref{Multiple
1281Displays}. 1296Terminals}.
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
1290window always resides on the selected frame. 1305window always resides on the selected frame.
1291 1306
1292When Emacs displays its frames on several terminals (@pxref{Multiple 1307When Emacs displays its frames on several terminals (@pxref{Multiple
1293Displays}), each terminal has its own selected frame. But only one of 1308Terminals}), each terminal has its own selected frame. But only one
1294these is ``@emph{the} selected frame'': it's the frame that belongs to 1309of these is ``@emph{the} selected frame'': it's the frame that belongs
1295the terminal from which the most recent input came. That is, when Emacs 1310to the terminal from which the most recent input came. That is, when
1296runs a command that came from a certain terminal, the selected frame is 1311Emacs runs a command that came from a certain terminal, the selected
1297the one of that terminal. Since Emacs runs only a single command at any 1312frame is the one of that terminal. Since Emacs runs only a single
1298given time, it needs to consider only one selected frame at a time; this 1313command at any given time, it needs to consider only one selected
1299frame is what we call @dfn{the selected frame} in this manual. The 1314frame at a time; this frame is what we call @dfn{the selected frame}
1300display on which the selected frame is shown is the @dfn{selected 1315in this manual. The display on which the selected frame is shown is
1301frame's display}. 1316the @dfn{selected frame's display}.
1302 1317
1303@defun selected-frame 1318@defun selected-frame
1304This function returns the selected frame. 1319This function returns the selected frame.
@@ -2285,7 +2300,7 @@ On a character terminal, it gives the height in characters.
2285 2300
2286For graphical terminals, note that on ``multi-monitor'' setups this 2301For graphical terminals, note that on ``multi-monitor'' setups this
2287refers to the pixel width for all physical monitors associated with 2302refers 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
2295For graphical terminals, note that on ``multi-monitor'' setups this 2310For graphical terminals, note that on ``multi-monitor'' setups this
2296refers to the pixel width for all physical monitors associated with 2311refers 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
898or overlay keymaps, and all the minor mode keymaps. 898or overlay keymaps, and all the minor mode keymaps.
899 899
900This variable is always local to the current terminal and cannot be 900This variable is always local to the current terminal and cannot be
901buffer-local. @xref{Multiple Displays}. It is used to implement 901buffer-local. @xref{Multiple Terminals}. It is used to implement
902incremental search mode. 902incremental 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
2071used by the X server actually in use. 2071used by the X server actually in use.
2072 2072
2073The variable is always local to the current terminal, and cannot be 2073The variable is always local to the current terminal, and cannot be
2074buffer-local. @xref{Multiple Displays}. 2074buffer-local. @xref{Multiple Terminals}.
2075@end defvar 2075@end defvar
2076 2076
2077You can specify which keysyms Emacs should use for the Meta, Alt, Hyper, and Super modifiers by setting these variables: 2077You 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
258Variables}); a few variables have terminal-local bindings 258Variables}); 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
260like ordinary local bindings, but they are localized depending on 260like 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
1092different values for a variable in different buffers is an important 1092different values for a variable in different buffers is an important
1093customization method. (Variables can also have bindings that are 1093customization method. (Variables can also have bindings that are
1094local to each terminal, or to each frame. @xref{Multiple Displays}, 1094local to each terminal, or to each frame. @xref{Multiple Terminals},
1095and @xref{Frame-Local Variables}.) 1095and @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
1196Displays}). 1196Terminals}).
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
1245because @code{let} does not distinguish between different kinds of 1245because @code{let} does not distinguish between different kinds of
1246bindings; it knows only which variable the binding was made for. 1246bindings; it knows only which variable the binding was made for.
1247 1247
1248If the variable is terminal-local (@pxref{Multiple Displays}), or 1248If the variable is terminal-local (@pxref{Multiple Terminals}), or
1249frame-local (@pxref{Frame-Local Variables}), this function signals an 1249frame-local (@pxref{Frame-Local Variables}), this function signals an
1250error. Such variables cannot have buffer-local bindings as well. 1250error. 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
948Frames 948Frames
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
947Frames 947Frames
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.