comparison man/xresources.texi @ 41368:6a9bede30a62

Move some of the nodes back to cmdargs.texi--they actually describe options. Break out new nodes Table of Resources and Face Resources.
author Richard M. Stallman <rms@gnu.org>
date Thu, 22 Nov 2001 11:36:36 +0000
parents 3e02d6f71d09
children 11a1b4e2b45a
comparison
equal deleted inserted replaced
41367:65eb0f7957c8 41368:6a9bede30a62
1 @c This is part of the Emacs manual. 1 @c This is part of the Emacs manual.
2 @c Copyright (C) 1987,93,94,95,1997,2001 Free Software Foundation, Inc. 2 @c Copyright (C) 1987,93,94,95,1997,2001 Free Software Foundation, Inc.
3 @c See file emacs.texi for copying conditions. 3 @c See file emacs.texi for copying conditions.
4 @node X Resources, Antinews, Command Arguments, Top 4 @node X Resources, Antinews, Command Arguments, Top
5 @appendix X Resources 5 @appendix X Options and Resources
6 6
7 Some aspects of Emacs behavior can be customized using X resources, 7 You can customize some X-related aspects of Emacs behavior using X
8 as is usual for programs that use X. X resources are the only way to 8 resources, as is usual for programs that use X. X resources are the
9 customize tooltip windows and LessTif menus, since the libraries that 9 only way to customize tooltip windows and LessTif menus, since the
10 implement them don't provide for customization through Emacs. This 10 libraries that implement them don't provide for customization through
11 appendix describes the X resources that Emacs recognizes and what they 11 Emacs. This appendix describes the X resources that Emacs recognizes
12 mean. 12 and how to use them.
13
14 @menu
15 * Resources:: Using X resources with Emacs (in general).
16 * Table of Resources:: Table of specific X resources that affect Emacs.
17 * Face Resources:: X resources for customizing faces.
18 * Lucid Resources:: X resources for Lucid menus.
19 * LessTif Resources:: X resources for LessTif and Motif menus.
20 @end menu
21
22 @node Resources X
23 @appendixsec X Resources
24 @cindex resources
25
26 @cindex X resources, @file{~/.Xdefaults} file
27 Programs running under the X Window System organize their user options
28 under a hierarchy of classes and resources. You can specify default
29 values for these options in your X resources file, usually named
30 @file{~/.Xdefaults}.
31
32 Each line in the file specifies a value for one option or for a
33 collection of related options, for one program or for several programs
34 (optionally even for all programs).
35
36 @cindex Registry (MS-Windows)
37 @cindex @file{.Xdefaults} file, and MS-Windows
38 MS-Windows systems don't support @file{~/.Xdefaults} files, but
39 Emacs compiled for Windows looks for X resources in the Windows
40 Registry, under the keys @samp{HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs}
41 and @samp{HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs}.
42
43 Programs define named resources with particular meanings. They also
44 define how to group resources into named classes. For instance, in
45 Emacs, the @samp{internalBorder} resource controls the width of the
46 internal border, and the @samp{borderWidth} resource controls the width
47 of the external border. Both of these resources are part of the
48 @samp{BorderWidth} class. Case distinctions are significant in these
49 names.
50
51 In @file{~/.Xdefaults}, you can specify a value for a single resource
52 on one line, like this:
53
54 @example
55 emacs.borderWidth: 2
56 @end example
57
58 @noindent
59 Or you can use a class name to specify the same value for all resources
60 in that class. Here's an example:
61
62 @example
63 emacs.BorderWidth: 2
64 @end example
65
66 If you specify a value for a class, it becomes the default for all
67 resources in that class. You can specify values for individual
68 resources as well; these override the class value, for those particular
69 resources. Thus, this example specifies 2 as the default width for all
70 borders, but overrides this value with 4 for the external border:
71
72 @example
73 emacs.BorderWidth: 2
74 emacs.borderWidth: 4
75 @end example
76
77 The order in which the lines appear in the file does not matter.
78 Also, command-line options always override the X resources file.
79
80 The string @samp{emacs} in the examples above is also a resource
81 name. It actually represents the name of the executable file that you
82 invoke to run Emacs. If Emacs is installed under a different name, it
83 looks for resources under that name instead of @samp{emacs}.
84
85 @table @samp
86 @item -name @var{name}
87 @opindex --name
88 @itemx --name=@var{name}
89 @cindex resource name, command-line argument
90 Use @var{name} as the resource name (and the title) for the initial
91 Emacs frame. This option does not affect subsequent frames, but Lisp
92 programs can specify frame names when they create frames.
93
94 If you don't specify this option, the default is to use the Emacs
95 executable's name as the resource name.
96
97 @item -xrm @var{resource-values}
98 @opindex --xrm
99 @itemx --xrm=@var{resource-values}
100 @cindex resource values, command-line argument
101 Specify X resource values for this Emacs job (see below).
102 @end table
103
104 For consistency, @samp{-name} also specifies the name to use for
105 other resource values that do not belong to any particular frame.
106
107 The resources that name Emacs invocations also belong to a class; its
108 name is @samp{Emacs}. If you write @samp{Emacs} instead of
109 @samp{emacs}, the resource applies to all frames in all Emacs jobs,
110 regardless of frame titles and regardless of the name of the executable
111 file. Here is an example:
112
113 @example
114 Emacs.BorderWidth: 2
115 Emacs.borderWidth: 4
116 @end example
117
118 You can specify a string of additional resource values for Emacs to
119 use with the command line option @samp{-xrm @var{resources}}. The text
120 @var{resources} should have the same format that you would use inside a file
121 of X resources. To include multiple resource specifications in
122 @var{resources}, put a newline between them, just as you would in a file.
123 You can also use @samp{#include "@var{filename}"} to include a file full
124 of resource specifications. Resource values specified with @samp{-xrm}
125 take precedence over all other resource specifications.
13 126
14 One way to experiment with the effect of different resource settings 127 One way to experiment with the effect of different resource settings
15 is to use the @code{editres} program. Select @samp{Get Tree} from the 128 is to use the @code{editres} program. Select @samp{Get Tree} from the
16 @samp{Commands} menu, then click on an Emacs frame. This will display 129 @samp{Commands} menu, then click on an Emacs frame. This will display
17 a tree showing the structure of X toolkit widgets used in an Emacs 130 a tree showing the structure of X toolkit widgets used in an Emacs
18 frame. Select one of them, such as @samp{menubar}, then select 131 frame. Select one of them, such as @samp{menubar}, then select
19 @samp{Show Resource Box} from the @samp{Commands} menu. This displays 132 @samp{Show Resource Box} from the @samp{Commands} menu. This displays
20 a list of all the meaningful X resources and allows you to edit them. 133 a list of all the meaningful X resources and allows you to edit them.
21 Changes take effect immediately if you click on the @samp{Apply} button. 134 Changes take effect immediately if you click on the @samp{Apply} button.
22 135
23 @menu 136 @node Table of Resources
24 * Display X:: Changing the default display and using remote login. 137 @appendixsec Table of X Resources for Emacs
25 * Font X:: Choosing a font for text, under X. 138
26 * Colors X:: Choosing colors, under X. 139 This table lists the resource names that designate options for
27 * Window Size X:: Start-up window size, under X. 140 Emacs, each with the class that it belongs to:
28 * Borders X:: Internal and external borders, under X.
29 * Title X:: Specifying the initial frame's title.
30 * Icons X:: Choosing what sort of icon to use, under X.
31 * Resources X:: Advanced use of classes and resources, under X.
32 * Lucid Resources:: X resources for Lucid menus.
33 * LessTif Resources:: X resources for LessTif and Motif menus.
34 @end menu
35
36 @node Display X
37 @appendixsec Specifying the Display Name
38 @cindex display name (X Window System)
39 @cindex @env{DISPLAY} environment variable
40
41 The environment variable @env{DISPLAY} tells all X clients, including
42 Emacs, where to display their windows. Its value is set by default
43 in ordinary circumstances, when you start an X server and run jobs
44 locally. Occasionally you may need to specify the display yourself; for
45 example, if you do a remote login and want to run a client program
46 remotely, displaying on your local screen.
47
48 With Emacs, the main reason people change the default display is to
49 let them log into another system, run Emacs on that system, but have the
50 window displayed at their local terminal. You might need to log in
51 to another system because the files you want to edit are there, or
52 because the Emacs executable file you want to run is there.
53
54 The syntax of the @env{DISPLAY} environment variable is
55 @samp{@var{host}:@var{display}.@var{screen}}, where @var{host} is the
56 host name of the X Window System server machine, @var{display} is an
57 arbitrarily-assigned number that distinguishes your server (X terminal)
58 from other servers on the same machine, and @var{screen} is a
59 rarely-used field that allows an X server to control multiple terminal
60 screens. The period and the @var{screen} field are optional. If
61 included, @var{screen} is usually zero.
62
63 For example, if your host is named @samp{glasperle} and your server is
64 the first (or perhaps the only) server listed in the configuration, your
65 @env{DISPLAY} is @samp{glasperle:0.0}.
66
67 You can specify the display name explicitly when you run Emacs, either
68 by changing the @env{DISPLAY} variable, or with the option @samp{-d
69 @var{display}} or @samp{--display=@var{display}}. Here is an example:
70
71 @smallexample
72 emacs --display=glasperle:0 &
73 @end smallexample
74
75 You can inhibit the direct use of the window system and GUI with the
76 @samp{-nw} option. It tells Emacs to display using ordinary ASCII on
77 its controlling terminal. This is also an initial option.
78
79 Sometimes, security arrangements prevent a program on a remote system
80 from displaying on your local system. In this case, trying to run Emacs
81 produces messages like this:
82
83 @smallexample
84 Xlib: connection to "glasperle:0.0" refused by server
85 @end smallexample
86
87 @noindent
88 You might be able to overcome this problem by using the @code{xhost}
89 command on the local system to give permission for access from your
90 remote machine.
91
92 @node Font X
93 @appendixsec Font Specification Options
94 @cindex font name (X Window System)
95
96 By default, Emacs displays text in the font named @samp{9x15}, which
97 makes each character nine pixels wide and fifteen pixels high. You can
98 specify a different font on your command line through the option
99 @samp{-fn @var{name}} (or @samp{--font}, which is an alias for
100 @samp{-fn}).
101
102 @table @samp
103 @item -fn @var{name}
104 @opindex -fn
105 @itemx --font=@var{name}
106 @opindex --font
107 @cindex specify default font from the command line
108 Use font @var{name} as the default font.
109 @end table
110
111 Under X, each font has a long name which consists of eleven words or
112 numbers, separated by dashes. Some fonts also have shorter
113 nicknames---@samp{9x15} is such a nickname. You can use either kind of
114 name. You can use wildcard patterns for the font name; then Emacs lets
115 X choose one of the fonts that match the pattern. Here is an example,
116 which happens to specify the font whose nickname is @samp{6x13}:
117
118 @smallexample
119 emacs -fn "-misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1" &
120 @end smallexample
121
122 @noindent
123 You can also specify the font in your @file{.Xdefaults} file:
124
125 @smallexample
126 emacs.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1
127 @end smallexample
128
129 A long font name has the following form:
130
131 @smallexample
132 -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
133 @dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{charset}
134 @end smallexample
135
136 @table @var
137 @item maker
138 This is the name of the font manufacturer.
139 @item family
140 This is the name of the font family---for example, @samp{courier}.
141 @item weight
142 This is normally @samp{bold}, @samp{medium} or @samp{light}. Other
143 words may appear here in some font names.
144 @item slant
145 This is @samp{r} (roman), @samp{i} (italic), @samp{o} (oblique),
146 @samp{ri} (reverse italic), or @samp{ot} (other).
147 @item widthtype
148 This is normally @samp{condensed}, @samp{extended}, @samp{semicondensed}
149 or @samp{normal}. Other words may appear here in some font names.
150 @item style
151 This is an optional additional style name. Usually it is empty---most
152 long font names have two hyphens in a row at this point.
153 @item pixels
154 This is the font height, in pixels.
155 @item height
156 This is the font height on the screen, measured in tenths of a printer's
157 point---approximately 1/720 of an inch. In other words, it is the point
158 size of the font, times ten. For a given vertical resolution,
159 @var{height} and @var{pixels} are proportional; therefore, it is common
160 to specify just one of them and use @samp{*} for the other.
161 @item horiz
162 This is the horizontal resolution, in pixels per inch, of the screen for
163 which the font is intended.
164 @item vert
165 This is the vertical resolution, in pixels per inch, of the screen for
166 which the font is intended. Normally the resolution of the fonts on
167 your system is the right value for your screen; therefore, you normally
168 specify @samp{*} for this and @var{horiz}.
169 @item spacing
170 This is @samp{m} (monospace), @samp{p} (proportional) or @samp{c}
171 (character cell).
172 @item width
173 This is the average character width, in pixels, multiplied by ten.
174 @item charset
175 This is the character set that the font depicts.
176 Normally you should use @samp{iso8859-1}.
177 @end table
178
179 @cindex listing system fonts
180 You will probably want to use a fixed-width default font---that is,
181 a font in which all characters have the same width. Any font with
182 @samp{m} or @samp{c} in the @var{spacing} field of the long name is a
183 fixed-width font. Here's how to use the @code{xlsfonts} program to
184 list all the fixed-width fonts available on your system:
185
186 @example
187 xlsfonts -fn '*x*' | egrep "^[0-9]+x[0-9]+"
188 xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-m*'
189 xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-c*'
190 @end example
191
192 @noindent
193 To see what a particular font looks like, use the @code{xfd} command.
194 For example:
195
196 @example
197 xfd -fn 6x13
198 @end example
199
200 @noindent
201 displays the entire font @samp{6x13}.
202
203 While running Emacs, you can set the font of the current frame
204 (@pxref{Frame Parameters}) or for a specific kind of text
205 (@pxref{Faces}).
206
207 @node Colors X
208 @appendixsec Window Color Options
209 @cindex color of window
210 @cindex text colors, from command line
211
212 @findex list-colors-display
213 @cindex available colors
214 On a color display, you can specify which color to use for various
215 parts of the Emacs display. To find out what colors are available on
216 your system, type @kbd{M-x list-colors-display}, or press
217 @kbd{C-Mouse-2} and select @samp{Display Colors} from the pop-up menu.
218 If you do not specify colors, on windowed displays the default for the
219 background is white and the default for all other colors is black. On a
220 monochrome display, the foreground is black, the background is white,
221 and the border is gray if the display supports that. On terminals, the
222 background is usually black and the foreground is white.
223
224 Here is a list of the command-line options for specifying colors:
225
226 @table @samp
227 @item -fg @var{color}
228 @opindex -fg
229 @itemx --foreground-color=@var{color}
230 @opindex --foreground-color
231 @cindex foreground color, command-line argument
232 Specify the foreground color. @var{color} should be a standard color
233 name, or a numeric specification of the color's red, green, and blue
234 components as in @samp{#4682B4} or @samp{RGB:46/82/B4}.
235 @item -bg @var{color}
236 @opindex -bg
237 @itemx --background-color=@var{color}
238 @opindex --background-color
239 @cindex background color, command-line argument
240 Specify the background color.
241 @item -bd @var{color}
242 @opindex -bd
243 @itemx --border-color=@var{color}
244 @opindex --border-color
245 @cindex border color, command-line argument
246 Specify the color of the border of the X window.
247 @item -cr @var{color}
248 @opindex -cr
249 @itemx --cursor-color=@var{color}
250 @opindex --cursor-color
251 @cindex cursor color, command-line argument
252 Specify the color of the Emacs cursor which indicates where point is.
253 @item -ms @var{color}
254 @opindex -ms
255 @itemx --mouse-color=@var{color}
256 @opindex --mouse-color
257 @cindex mouse pointer color, command-line argument
258 Specify the color for the mouse cursor when the mouse is in the Emacs window.
259 @item -r
260 @opindex -r
261 @itemx -rv
262 @opindex -rv
263 @itemx --reverse-video
264 @opindex --reverse-video
265 @cindex reverse video, command-line argument
266 Reverse video---swap the foreground and background colors.
267 @end table
268
269 For example, to use a coral mouse cursor and a slate blue text cursor,
270 enter:
271
272 @example
273 emacs -ms coral -cr 'slate blue' &
274 @end example
275
276 You can reverse the foreground and background colors through the
277 @samp{-rv} option or with the X resource @samp{reverseVideo}.
278
279 The @samp{-fg}, @samp{-bg}, and @samp{-rv} options function on
280 text-only terminals as well as on window systems.
281
282 @node Window Size X
283 @appendixsec Options for Window Geometry
284 @cindex geometry of Emacs window
285 @cindex position and size of Emacs frame
286 @cindex width and height of Emacs frame
287
288 The @samp{--geometry} option controls the size and position of the
289 initial Emacs frame. Here is the format for specifying the window
290 geometry:
291
292 @table @samp
293 @item -g @var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]}
294 @opindex -g
295 Specify window size @var{width} and @var{height} (measured in character
296 columns and lines), and positions @var{xoffset} and @var{yoffset}
297 (measured in pixels).
298
299 @item --geometry=@var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]}
300 @opindex --geometry
301 This is another way of writing the same thing.
302 @end table
303
304 @noindent
305 @code{@r{@{}+-@r{@}}} means either a plus sign or a minus sign. A plus
306 sign before @var{xoffset} means it is the distance from the left side of
307 the screen; a minus sign means it counts from the right side. A plus
308 sign before @var{yoffset} means it is the distance from the top of the
309 screen, and a minus sign there indicates the distance from the bottom.
310 The values @var{xoffset} and @var{yoffset} may themselves be positive or
311 negative, but that doesn't change their meaning, only their direction.
312
313 Emacs uses the same units as @code{xterm} does to interpret the geometry.
314 The @var{width} and @var{height} are measured in characters, so a large font
315 creates a larger frame than a small font. (If you specify a proportional
316 font, Emacs uses its maximum bounds width as the width unit.) The
317 @var{xoffset} and @var{yoffset} are measured in pixels.
318
319 Since the mode line and the echo area occupy the last 2 lines of the
320 frame, the height of the initial text window is 2 less than the height
321 specified in your geometry. In non-X-toolkit versions of Emacs, the
322 menu bar also takes one line of the specified number. But in the X
323 toolkit version, the menu bar is additional and does not count against
324 the specified height. The tool bar, if present, is also additional.
325
326 You do not have to specify all of the fields in the geometry
327 specification.
328
329 If you omit both @var{xoffset} and @var{yoffset}, the window manager
330 decides where to put the Emacs frame, possibly by letting you place
331 it with the mouse. For example, @samp{164x55} specifies a window 164
332 columns wide, enough for two ordinary width windows side by side, and 55
333 lines tall.
334
335 The default width for Emacs is 80 characters and the default height is
336 40 lines. You can omit either the width or the height or both. If
337 you start the geometry with an integer, Emacs interprets it as the
338 width. If you start with an @samp{x} followed by an integer, Emacs
339 interprets it as the height. Thus, @samp{81} specifies just the width;
340 @samp{x45} specifies just the height.
341
342 If you start with @samp{+} or @samp{-}, that introduces an offset,
343 which means both sizes are omitted. Thus, @samp{-3} specifies the
344 @var{xoffset} only. (If you give just one offset, it is always
345 @var{xoffset}.) @samp{+3-3} specifies both the @var{xoffset} and the
346 @var{yoffset}, placing the frame near the bottom left of the screen.
347
348 You can specify a default for any or all of the fields in
349 @file{.Xdefaults} file, and then override selected fields with a
350 @samp{--geometry} option.
351
352 @node Borders X
353 @appendixsec Internal and External Borders
354 @cindex borders (X Window System)
355
356 An Emacs frame has an internal border and an external border. The
357 internal border is an extra strip of the background color around the
358 text portion of the frame. Emacs itself draws the internal border.
359 The external border is added by the window manager outside the frame;
360 depending on the window manager you use, it may contain various boxes
361 you can click on to move or iconify the window.
362
363 @table @samp
364 @item -ib @var{width}
365 @opindex -ib
366 @itemx --internal-border=@var{width}
367 @opindex --internal-border
368 @cindex border width, command-line argument
369 Specify @var{width} as the width of the internal border, in pixels.
370
371 @item -bw @var{width}
372 @opindex -bw
373 @itemx --border-width=@var{width}
374 @opindex --border-width
375 Specify @var{width} as the width of the main border, in pixels.
376 @end table
377
378 When you specify the size of the frame, that does not count the
379 borders. The frame's position is measured from the outside edge of the
380 external border.
381
382 Use the @samp{-ib @var{n}} option to specify an internal border
383 @var{n} pixels wide. The default is 1. Use @samp{-bw @var{n}} to
384 specify the width of the external border (though the window manager may
385 not pay attention to what you specify). The default width of the
386 external border is 2.
387
388 @node Title X
389 @appendixsec Frame Titles
390
391 An Emacs frame may or may not have a specified title. The frame
392 title, if specified, appears in window decorations and icons as the
393 name of the frame. If an Emacs frame has no specified title, the
394 default title has the form @samp{@var{invocation-name}@@@var{machine}}
395 (if there is only one frame) or the selected window's buffer name (if
396 there is more than one frame).
397
398 You can specify a title for the initial Emacs frame with a command
399 line option:
400
401 @table @samp
402 @item -title @var{title}
403 @opindex --title
404 @itemx --title=@var{title}
405 @itemx -T @var{title}
406 @opindex -T
407 @cindex frame title, command-line argument
408 Specify @var{title} as the title for the initial Emacs frame.
409 @end table
410
411 The @samp{--name} option (@pxref{Resources X}) also specifies the title
412 for the initial Emacs frame.
413
414 @node Icons X
415 @appendixsec Icons
416 @cindex icons (X Window System)
417
418 Most window managers allow the user to ``iconify'' a frame, removing
419 it from sight, and leaving a small, distinctive ``icon'' window in its
420 place. Clicking on the icon window makes the frame itself appear again.
421 If you have many clients running at once, you can avoid cluttering up
422 the screen by iconifying most of the clients.
423
424 @table @samp
425 @item -i
426 @opindex -i
427 @itemx --icon-type
428 @opindex --icon-type
429 @cindex Emacs icon, a gnu
430 Use a picture of a gnu as the Emacs icon.
431
432 @item -iconic
433 @opindex --iconic
434 @itemx --iconic
435 @cindex start iconified, command-line argument
436 Start Emacs in iconified state.
437 @end table
438
439 The @samp{-i} or @samp{--icon-type} option tells Emacs to use an icon
440 window containing a picture of the GNU gnu. If omitted, Emacs lets the
441 window manager choose what sort of icon to use---usually just a small
442 rectangle containing the frame's title.
443
444 The @samp{-iconic} option tells Emacs to begin running as an icon,
445 rather than showing a frame right away. In this situation, the icon
446 is the only indication that Emacs has started; the text frame doesn't
447 appear until you deiconify it.
448
449 @node Resources X
450 @appendixsec X Resources
451 @cindex resources
452
453 @cindex X resources, @file{~/.Xdefaults} file
454 Programs running under the X Window System organize their user options
455 under a hierarchy of classes and resources. You can specify default
456 values for these options in your X resources file, usually named
457 @file{~/.Xdefaults}.
458
459 Each line in the file specifies a value for one option or for a
460 collection of related options, for one program or for several programs
461 (optionally even for all programs).
462
463 @cindex Registry (MS-Windows)
464 @cindex @file{.Xdefaults} file, and MS-Windows
465 MS-Windows systems don't support @file{~/.Xdefaults} files, but
466 Emacs compiled for Windows looks for X resources in the Windows
467 Registry, under the keys @samp{HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs}
468 and @samp{HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs}.
469
470 Programs define named resources with particular meanings. They also
471 define how to group resources into named classes. For instance, in
472 Emacs, the @samp{internalBorder} resource controls the width of the
473 internal border, and the @samp{borderWidth} resource controls the width
474 of the external border. Both of these resources are part of the
475 @samp{BorderWidth} class. Case distinctions are significant in these
476 names.
477
478 In @file{~/.Xdefaults}, you can specify a value for a single resource
479 on one line, like this:
480
481 @example
482 emacs.borderWidth: 2
483 @end example
484
485 @noindent
486 Or you can use a class name to specify the same value for all resources
487 in that class. Here's an example:
488
489 @example
490 emacs.BorderWidth: 2
491 @end example
492
493 If you specify a value for a class, it becomes the default for all
494 resources in that class. You can specify values for individual
495 resources as well; these override the class value, for those particular
496 resources. Thus, this example specifies 2 as the default width for all
497 borders, but overrides this value with 4 for the external border:
498
499 @example
500 emacs.BorderWidth: 2
501 emacs.borderWidth: 4
502 @end example
503
504 The order in which the lines appear in the file does not matter.
505 Also, command-line options always override the X resources file.
506
507 The string @samp{emacs} in the examples above is also a resource
508 name. It actually represents the name of the executable file that you
509 invoke to run Emacs. If Emacs is installed under a different name, it
510 looks for resources under that name instead of @samp{emacs}.
511
512 @table @samp
513 @item -name @var{name}
514 @opindex --name
515 @itemx --name=@var{name}
516 @cindex resource name, command-line argument
517 Use @var{name} as the resource name (and the title) for the initial
518 Emacs frame. This option does not affect subsequent frames, but Lisp
519 programs can specify frame names when they create frames.
520
521 If you don't specify this option, the default is to use the Emacs
522 executable's name as the resource name.
523
524 @item -xrm @var{resource-values}
525 @opindex --xrm
526 @itemx --xrm=@var{resource-values}
527 @cindex resource values, command-line argument
528 Specify X resource values for this Emacs job (see below).
529 @end table
530
531 For consistency, @samp{-name} also specifies the name to use for
532 other resource values that do not belong to any particular frame.
533
534 The resources that name Emacs invocations also belong to a class; its
535 name is @samp{Emacs}. If you write @samp{Emacs} instead of
536 @samp{emacs}, the resource applies to all frames in all Emacs jobs,
537 regardless of frame titles and regardless of the name of the executable
538 file. Here is an example:
539
540 @example
541 Emacs.BorderWidth: 2
542 Emacs.borderWidth: 4
543 @end example
544
545 You can specify a string of additional resource values for Emacs to
546 use with the command line option @samp{-xrm @var{resources}}. The text
547 @var{resources} should have the same format that you would use inside a file
548 of X resources. To include multiple resource specifications in
549 @var{resources}, put a newline between them, just as you would in a file.
550 You can also use @samp{#include "@var{filename}"} to include a file full
551 of resource specifications. Resource values specified with @samp{-xrm}
552 take precedence over all other resource specifications.
553
554 The following table lists the resource names that designate options
555 for Emacs, each with the class that it belongs to:
556 141
557 @table @asis 142 @table @asis
558 @item @code{background} (class @code{Background}) 143 @item @code{background} (class @code{Background})
559 Background color name. 144 Background color name.
560 145
650 @item @code{verticalScrollBars} (class @code{ScrollBars}) 235 @item @code{verticalScrollBars} (class @code{ScrollBars})
651 Give frames scroll bars if @samp{on}; don't have scroll bars if 236 Give frames scroll bars if @samp{on}; don't have scroll bars if
652 @samp{off}. 237 @samp{off}.
653 @end table 238 @end table
654 239
655 Here are resources for controlling the appearance of particular faces 240 @node Face Resources
656 (@pxref{Faces}): 241 @appendixsec X Resources for Faces
242
243 You can also use resources to customize the appearance of particular
244 faces (@pxref{Faces}):
657 245
658 @table @code 246 @table @code
659 @item @var{face}.attributeFont 247 @item @var{face}.attributeFont
660 Font for face @var{face}. 248 Font for face @var{face}.
661 @item @var{face}.attributeForeground 249 @item @var{face}.attributeForeground