annotate man/lispref/consoles-devices.texi @ 5630:f5315ccbf005

Cons less, be more careful about always using the environment, #'macroexpand 2011-12-30 Aidan Kehoe <kehoea@parhasard.net> * eval.c (Fmacroexpand): Don't cons if ENVIRONMENT is the same object as byte-compile-macro-environment. Always look up symbol- and other macros in the (possibly modified) byte-compile-macro-environment, not the supplied ENVIRONMENT. byte-compile-macro-environment reflects ENVIRONMENT, so that's OK and preferred.
author Aidan Kehoe <kehoea@parhasard.net>
date Fri, 30 Dec 2011 12:43:52 +0000
parents 576fb035e263
children 9fae6227ede5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 @c -*-texinfo-*-
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 @c This is part of the XEmacs Lisp Reference Manual.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 @c Copyright (C) 1995, 1996 Ben Wing.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 @c See the file lispref.texi for copying conditions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 @setfilename ../../info/consoles-devices.info
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 @node Consoles and Devices, Positions, Frames, top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 @chapter Consoles and Devices
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 @cindex devices
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 @cindex consoles
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 A @dfn{console} is an object representing a single input connection
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 to XEmacs, such as an X display or a TTY connection. It is possible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 for XEmacs to have frames on multiple consoles at once (even on
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
14 heterogeneous types---you can simultaneously have a frame on an
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 X display and a TTY connection). Normally, there is only one
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 console in existence.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 A @dfn{device} is an object representing a single output device, such
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 as a particular screen on an X display. (Usually there is exactly one
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 device per X console connection, but there may be more than one if you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 have a multi-headed X display. For TTY connections, there is always
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 exactly one device per console.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 Each device has one or more @dfn{frames} in which text can be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 displayed. For X displays and the like, a frame corresponds to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 normal window-system concept of a window. Frames can overlap, be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 displayed at various locations within the display, be resized, etc. For
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 TTY, only one frame can be displayed at a time, and it occupies the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 entire TTY display area.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 However, you can still define multiple frames and switch between them.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 Their contents are entirely separate from each other. These sorts of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 frames resemble the ``virtual console'' capability provided under Linux
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 or the multiple screens provided by the multiplexing program
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 @samp{screen} under Unix.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 When you start up XEmacs, an initial console and device are created to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 receive input and display frames on. This will either be an X display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 or a TTY connection, depending on what mode you started XEmacs in (this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 is determined by the @samp{DISPLAY} environment variable, the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 @samp{-nw}, @samp{-t} and @samp{-display} command-line options, etc.).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 You can connect to other X displays and TTY connections by creating
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 new console objects, and to other X screens on an existing display by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 creating new device objects, as described below. Many functions (for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 example the frame-creation functions) take an optional device argument
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 specifying which device the function pertains to. If the argument is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 omitted, it defaults to the selected device (see below).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 @defun consolep object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 This returns non-@code{nil} if @var{object} is a console.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 @defun devicep object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 This returns non-@code{nil} if @var{object} is a device.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 * Basic Console Functions:: Functions for working with consoles.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 * Basic Device Functions:: Functions for working with devices.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 * Console Types and Device Classes::
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 I/O and color characteristics.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 * Connecting to a Console or Device::
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 * The Selected Console and Device::
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 * Console and Device I/O:: Controlling input and output.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 @node Basic Console Functions
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 @section Basic Console Functions
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 @defun console-list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 This function returns a list of all existing consoles.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 @defun console-device-list &optional console
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 This function returns a list of all devices on @var{console}. If
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 @var{console} is @code{nil}, the selected console will be used.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 @node Basic Device Functions
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 @section Basic Device Functions
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 @defun device-list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 This function returns a list of all existing devices.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 @defun device-or-frame-p object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 This function returns non-@code{nil} if @var{object} is a device or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 frame. This function is useful because devices and frames are similar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 in many respects and many functions can operate on either one.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
93 @defun device-frame-list &optional device
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 This function returns a list of all frames on @var{device}.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
95 @var{device} defaults to the currently selected device.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
98 @defun frame-device &optional frame
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 This function returns the device that @var{frame} is on.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
100 @var{frame} defaults to the currently selected frame.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 @node Console Types and Device Classes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 @section Console Types and Device Classes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 Every device is of a particular @dfn{type}, which describes how the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 connection to that device is made and how the device operates, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 a particular @dfn{class}, which describes other characteristics of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 the device (currently, the color capabilities of the device).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 The currently-defined device types are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 @table @code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 @item x
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 A connection to an X display (such as @samp{willow:0}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 @item tty
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 A connection to a tty (such as @samp{/dev/ttyp3}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 @item stream
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 A stdio connection. This describes a device for which input and output
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 is only possible in a stream-like fashion, such as when XEmacs in running
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 in batch mode. The very first device created by XEmacs is a terminal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 device and is used to print out messages of various sorts (for example,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 the help message when you use the @samp{-help} command-line option).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 The currently-defined device classes are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 @table @code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 @item color
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 A color device.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 @item grayscale
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 A grayscale device (a device that can display multiple shades of gray,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 but no color).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 @item mono
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 A device that can only display two colors (e.g. black and white).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
141 @defun device-type &optional device
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 This function returns the type of @var{device}. This is a symbol whose
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
143 name is one of the device types mentioned above. @var{device} defaults
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
144 to the selected device.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 @defun device-or-frame-type device-or-frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 This function returns the type of @var{device-or-frame}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
151 @defun device-class &optional device
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 This function returns the class (color behavior) of @var{device}. This
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 is a symbol whose name is one of the device classes mentioned above.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 @defun valid-device-type-p device-type
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 This function returns whether @var{device-type} (which should be a symbol)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
158 specifies a valid device type.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 @defun valid-device-class-p device-class
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 This function returns whether @var{device-class} (which should be a symbol)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
163 specifies a valid device class.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 @defvar terminal-device
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 This variable holds the initial terminal device object, which
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 represents XEmacs's stdout.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 @node Connecting to a Console or Device
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 @section Connecting to a Console or Device
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
174 @defun make-device type connection &optional props
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 This function creates a new device.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 The following two functions create devices of specific types and are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 written in terms of @code{make-device}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
181 @defun make-tty-device &optional tty terminal-type
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 This function creates a new tty device on @var{tty}. This also creates
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 the tty's first frame. @var{tty} should be a string giving the name of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 a tty device file (e.g. @samp{/dev/ttyp3} under SunOS et al.), as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 returned by the @samp{tty} command issued from the Unix shell. A value
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 of @code{nil} means use the stdin and stdout as passed to XEmacs from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 the shell. If @var{terminal-type} is non-@code{nil}, it should be a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 string specifying the type of the terminal attached to the specified
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 tty. If it is @code{nil}, the terminal type will be inferred from the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 @samp{TERM} environment variable.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 @defun make-x-device &optional display argv-list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 This function creates a new device connected to @var{display}. Optional
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 argument @var{argv-list} is a list of strings describing command line
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 options.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
199 @defun delete-device device &optional force
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 This function deletes @var{device}, permanently eliminating it from use.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 This disconnects XEmacs's connection to the device.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 @defvar create-device-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 This variable, if non-@code{nil}, should contain a list of functions,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 which are called when a device is created.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 @defvar delete-device-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 This variable, if non-@code{nil}, should contain a list of functions,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 which are called when a device is deleted.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 @end defvar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 @defun console-live-p object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 This function returns non-@code{nil} if @var{object} is a console that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 has not been deleted.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 @defun device-live-p object
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 This function returns non-@code{nil} if @var{object} is a device that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 has not been deleted.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 @defun device-x-display device
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 This function returns the X display which @var{device} is connected to,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 if @var{device} is an X device.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 @node The Selected Console and Device
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 @section The Selected Console and Device
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 @defun select-console console
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 This function selects the console @var{console}. Subsequent editing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 commands apply to its selected device, selected frame, and selected
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 window. The selection of @var{console} lasts until the next time the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 user does something to select a different console, or until the next
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 time this function is called.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 @defun selected-console
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 This function returns the console which is currently active.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 @defun select-device device
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 This function selects the device @var{device}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 @defun selected-device &optional console
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 This function returns the device which is currently active. If optional
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 @var{console} is non-@code{nil}, this function returns the device that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 would be currently active if @var{console} were the selected console.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 @node Console and Device I/O
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 @section Console and Device I/O
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 @defun console-disable-input console
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 This function disables input on console @var{console}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 @defun console-enable-input console
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 This function enables input on console @var{console}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 Each device has a @dfn{baud rate} value associated with it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 On most systems, changing this value will affect the amount of padding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 and other strategic decisions made during redisplay.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 @defun device-baud-rate &optional device
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 This function returns the output baud rate of @var{device}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 @end defun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 @defun set-device-baud-rate device rate
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 This function sets the output baud rate of @var{device} to @var{rate}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 @end defun