]> code.delx.au - gnu-emacs/blob - man/xresources.texi
Minor clarification of previous change.
[gnu-emacs] / man / xresources.texi
1 @c This is part of the Emacs manual.
2 @c Copyright (C) 1987,93,94,95,1997,2001 Free Software Foundation, Inc.
3 @c See file emacs.texi for copying conditions.
4 @node X Resources, Antinews, Command Arguments, Top
5 @appendix X Resources
6
7 Some aspects of Emacs behavior can be customized using X resources,
8 as is usual for programs that use X. X resources are the only way to
9 customize tooltip windows and LessTif menus, since the libraries that
10 implement them don't provide for customization through Emacs. This
11 appendix describes the X resources that Emacs recognizes and what they
12 mean.
13
14 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
16 @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
18 frame. Select one of them, such as @samp{menubar}, then select
19 @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.
21 Changes take effect immediately if you click on the @samp{Apply} button.
22
23 @menu
24 * Display X:: Changing the default display and using remote login.
25 * Font X:: Choosing a font for text, under X.
26 * Colors X:: Choosing colors, under X.
27 * Window Size X:: Start-up window size, under X.
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
557 @table @asis
558 @item @code{background} (class @code{Background})
559 Background color name.
560
561 @item @code{bitmapIcon} (class @code{BitmapIcon})
562 Use a bitmap icon (a picture of a gnu) if @samp{on}, let the window
563 manager choose an icon if @samp{off}.
564
565 @item @code{borderColor} (class @code{BorderColor})
566 Color name for the external border.
567
568 @item @code{borderWidth} (class @code{BorderWidth})
569 Width in pixels of the external border.
570
571 @item @code{cursorColor} (class @code{Foreground})
572 Color name for text cursor (point).
573
574 @item @code{font} (class @code{Font})
575 Font name for text (or fontset name, @pxref{Fontsets}).
576
577 @item @code{foreground} (class @code{Foreground})
578 Color name for text.
579
580 @item @code{geometry} (class @code{Geometry})
581 Window size and position. Be careful not to specify this resource as
582 @samp{emacs*geometry}, because that may affect individual menus as well
583 as the Emacs frame itself.
584
585 If this resource specifies a position, that position applies only to the
586 initial Emacs frame (or, in the case of a resource for a specific frame
587 name, only that frame). However, the size, if specified here, applies to
588 all frames.
589
590 @item @code{iconName} (class @code{Title})
591 Name to display in the icon.
592
593 @item @code{internalBorder} (class @code{BorderWidth})
594 Width in pixels of the internal border.
595
596 @item @code{lineSpacing} (class @code{LineSpacing})
597 @cindex line spacing
598 @cindex leading
599 Additional space (@dfn{leading}) between lines, in pixels.
600
601 @item @code{menuBar} (class @code{MenuBar})
602 Give frames menu bars if @samp{on}; don't have menu bars if @samp{off}.
603
604 @item @code{toolBar} (class @code{ToolBar})
605 Number of lines to reserve for the tool bar. A zero value suppresses
606 the tool bar. If the value is non-zero and
607 @code{auto-resize-tool-bars} is non-@code{nil}, the tool bar's size
608 will be changed automatically so that all tool bar items are visible.
609
610 @item @code{minibuffer} (class @code{Minibuffer})
611 If @samp{none}, don't make a minibuffer in this frame.
612 It will use a separate minibuffer frame instead.
613
614 @item @code{paneFont} (class @code{Font})
615 @cindex font for menus
616 Font name for menu pane titles, in non-toolkit versions of Emacs.
617
618 @item @code{pointerColor} (class @code{Foreground})
619 Color of the mouse cursor.
620
621 @ignore
622 @item @code{privateColormap} (class @code{PrivateColormap})
623 If @samp{on}, use a private color map, in the case where the ``default
624 visual'' of class PseudoColor and Emacs is using it.
625 @end ignore
626
627 @item @code{reverseVideo} (class @code{ReverseVideo})
628 Switch foreground and background default colors if @samp{on}, use colors as
629 specified if @samp{off}.
630
631 @item @code{screenGamma} (class @code{ScreenGamma})
632 @cindex gamma correction
633 Gamma correction for colors, equivalent to the frame parameter
634 @code{screen-gamma}.
635
636 @item @code{selectionFont} (class @code{Font})
637 Font name for pop-up menu items, in non-toolkit versions of Emacs. (For
638 toolkit versions, see @ref{Lucid Resources}, also see @ref{LessTif
639 Resources}.)
640
641 @item @code{synchronous} (class @code{Synchronous})
642 @cindex debugging X problems
643 @cindex synchronous X mode
644 Run Emacs in synchronous mode if @samp{on}. Synchronous mode is
645 useful for debugging X problems.
646
647 @item @code{title} (class @code{Title})
648 Name to display in the title bar of the initial Emacs frame.
649
650 @item @code{verticalScrollBars} (class @code{ScrollBars})
651 Give frames scroll bars if @samp{on}; don't have scroll bars if
652 @samp{off}.
653 @end table
654
655 Here are resources for controlling the appearance of particular faces
656 (@pxref{Faces}):
657
658 @table @code
659 @item @var{face}.attributeFont
660 Font for face @var{face}.
661 @item @var{face}.attributeForeground
662 Foreground color for face @var{face}.
663 @item @var{face}.attributeBackground
664 Background color for face @var{face}.
665 @item @var{face}.attributeUnderline
666 Underline flag for face @var{face}. Use @samp{on} or @samp{true} for
667 yes.
668 @item @var{face}.attributeFamily
669 Font family for face @var{face}.
670 @item @var{face}.attributeWidth
671 Relative proportional width of the font to use for face @var{face}.
672 It should be one of @code{ultra-condensed}, @code{extra-condensed},
673 @code{condensed}, @code{semi-condensed}, @code{normal},
674 @code{semi-expanded}, @code{expanded}, @code{extra-expanded}, or
675 @code{ultra-expanded}.
676 @item @var{face}.attributeHeight
677 Height of the font to use for face @var{face}: either an integer
678 specifying the height in units of 1/10@dmn{pt}, or a floating point
679 number that specifies a scale factor to scale the underlying face's
680 default font, or a function to be called with the default height which
681 will return a new height.
682 @item @var{face}.attributeWeight
683 A weight to use for the face @var{face}. It must be one of
684 @code{ultra-bold}, @code{extra-bold}, @code{bold},
685 @code{semi-bold}, @code{normal}, @code{semi-light}, @code{light},
686 @code{extra-light}, @code{ultra-light}.
687 @item @var{face}.attributeSlant
688 The slant to use for the font of face @var{face}. It must be one of
689 @code{italic}, @code{oblique}, @code{normal},
690 @code{reverse-italic}, or @code{reverse-oblique}.
691 @item @var{face}.attributeStrikeThrough
692 Whether the face @var{face} should be drawn with a line striking
693 through the characters.
694 @item @var{face}.attributeOverline
695 Whether the characters in the face @var{face} should be overlined.
696 @item @var{face}.attributeBox
697 Whether to draw a box around the characters in face @var{face}.
698 @item @var{face}.attributeInverse
699 Whether to display the characters in face @var{face} in inverse
700 video.
701 @item @var{face}.attributeStipple
702 The name of a pixmap data file to use for the stipple pattern, or
703 @code{false} to not use stipple for the face @var{face}.
704 @item @var{face}.attributeBackgroundPixmap
705 The background pixmap for the face @var{face}. Should be a name of a
706 pixmap file or @code{false}.
707 @item @var{face}.attributeBold
708 Whether to draw the characters in the face @var{face} as bold.
709 @item @var{face}.attributeItalic
710 Whether to draw the characters in the face @var{face} as italic.
711 @end table
712
713 @node Lucid Resources
714 @appendixsec Lucid Menu X Resources
715 @cindex Menu X Resources (Lucid widgets)
716 @cindex Lucid Widget X Resources
717
718 If the Emacs installed at your site was built to use the X toolkit
719 with the Lucid menu widgets, then the menu bar is a separate widget and
720 has its own resources. The resource names contain @samp{pane.menubar}
721 (following, as always, the name of the Emacs invocation, or @samp{Emacs},
722 which stands for all Emacs invocations). Specify them like this:
723
724 @example
725 Emacs.pane.menubar.@var{resource}: @var{value}
726 @end example
727
728 @noindent
729 For example, to specify the font @samp{8x16} for the menu-bar items,
730 write this:
731
732 @example
733 Emacs.pane.menubar.font: 8x16
734 @end example
735
736 @noindent
737 Resources for @emph{non-menubar} toolkit pop-up menus have
738 @samp{menu*}, in like fashion. For example, to specify the font
739 @samp{8x16} for the pop-up menu items, write this:
740
741 @example
742 Emacs.menu*.font: 8x16
743 @end example
744
745 @noindent
746 For dialog boxes, use @samp{dialog} instead of @samp{menu}:
747
748 @example
749 Emacs.dialog*.font: 8x16
750 @end example
751
752 @noindent
753 Experience shows that on some systems you may need to add
754 @samp{shell.}@: before the @samp{pane.menubar} or @samp{menu*}. On
755 some other systems, you must not add @samp{shell.}.
756
757 Here is a list of the specific resources for menu bars and pop-up menus:
758
759 @table @code
760 @item font
761 Font for menu item text.
762 @item foreground
763 Color of the foreground.
764 @item background
765 Color of the background.
766 @item buttonForeground
767 In the menu bar, the color of the foreground for a selected item.
768 @item horizontalSpacing
769 Horizontal spacing in pixels between items. Default is 3.
770 @item verticalSpacing
771 Vertical spacing in pixels between items. Default is 1.
772 @item arrowSpacing
773 Horizontal spacing between the arrow (which indicates a submenu) and
774 the associated text. Default is 10.
775 @item shadowThickness
776 Thickness of shadow line around the widget.
777 @item margin
778 The margin of the menu bar, in characters. The default of 4 makes the
779 menu bar appear like the LessTif/Motif one.
780 @end table
781
782 @node LessTif Resources
783 @appendixsec LessTif Menu X Resources
784 @cindex Menu X Resources (LessTif widgets)
785 @cindex LessTif Widget X Resources
786
787 If the Emacs installed at your site was built to use the X toolkit
788 with the LessTif or Motif widgets, then the menu bar, the dialog
789 boxes, the pop-up menus, and the file-selection box are separate
790 widgets and have their own resources.
791
792 The resource names for the menu bar contain @samp{pane.menubar}
793 (following, as always, the name of the Emacs invocation, or
794 @samp{Emacs}, which stands for all Emacs invocations). Specify them
795 like this:
796
797 @smallexample
798 Emacs.pane.menubar.@var{subwidget}.@var{resource}: @var{value}
799 @end smallexample
800
801 Each individual string in the menu bar is a subwidget; the subwidget's
802 name is the same as the menu item string. For example, the word
803 @samp{File} in the menu bar is part of a subwidget named
804 @samp{emacs.pane.menubar.File}. Most likely, you want to specify the
805 same resources for the whole menu bar. To do this, use @samp{*} instead
806 of a specific subwidget name. For example, to specify the font
807 @samp{8x16} for the menu-bar items, write this:
808
809 @smallexample
810 Emacs.pane.menubar.*.fontList: 8x16
811 @end smallexample
812
813 @noindent
814 This also specifies the resource value for submenus.
815
816 Each item in a submenu in the menu bar also has its own name for X
817 resources; for example, the @samp{File} submenu has an item named
818 @samp{Save (current buffer)}. A resource specification for a submenu
819 item looks like this:
820
821 @smallexample
822 Emacs.pane.menubar.popup_*.@var{menu}.@var{item}.@var{resource}: @var{value}
823 @end smallexample
824
825 @noindent
826 For example, here's how to specify the font for the @samp{Save (current
827 buffer)} item:
828
829 @smallexample
830 Emacs.pane.menubar.popup_*.File.Save (current buffer).fontList: 8x16
831 @end smallexample
832
833 @noindent
834 For an item in a second-level submenu, such as @samp{Complete Word}
835 under @samp{Spell Checking} under @samp{Tools}, the resource fits this
836 template:
837
838 @smallexample
839 Emacs.pane.menubar.popup_*.popup_*.@var{menu}.@var{resource}: @var{value}
840 @end smallexample
841
842 @noindent
843 For example,
844
845 @smallexample
846 Emacs.pane.menubar.popup_*.popup_*.Spell Checking.Complete Word: @var{value}
847 @end smallexample
848
849 @noindent
850 (This should be one long line.)
851
852 It's impossible to specify a resource for all the menu-bar items
853 without also specifying it for the submenus as well. So if you want the
854 submenu items to look different from the menu bar itself, you must ask
855 for that in two steps. First, specify the resource for all of them;
856 then, override the value for submenus alone. Here is an example:
857
858 @smallexample
859 Emacs.pane.menubar.*.fontList: 8x16
860 Emacs.pane.menubar.popup_*.fontList: 8x16
861 @end smallexample
862
863 @noindent
864 For LessTif pop-up menus, use @samp{menu*} instead of
865 @samp{pane.menubar}. For example, to specify the font @samp{8x16} for
866 the pop-up menu items, write this:
867
868 @smallexample
869 Emacs.menu*.fontList: 8x16
870 @end smallexample
871
872 @noindent
873 For LessTif dialog boxes, use @samp{dialog} instead of @samp{menu}:
874
875 @example
876 Emacs.dialog*.fontList: 8x16
877 Emacs.dialog*.foreground: hotpink
878 @end example
879
880 To specify resources for the LessTif file-selection box, use
881 @samp{fsb*}, like this:
882
883 @example
884 Emacs.fsb*.fontList: 8x16
885 @end example
886
887 @iftex
888 @medbreak
889 @end iftex
890 Here is a list of the specific resources for LessTif menu bars and
891 pop-up menus:
892
893 @table @code
894 @item armColor
895 The color to show in an armed button.
896 @item fontList
897 The font to use.
898 @item marginBottom
899 @itemx marginHeight
900 @itemx marginLeft
901 @itemx marginRight
902 @itemx marginTop
903 @itemx marginWidth
904 Amount of space to leave around the item, within the border.
905 @item borderWidth
906 The width of the border around the menu item, on all sides.
907 @item shadowThickness
908 The width of the border shadow.
909 @item bottomShadowColor
910 The color for the border shadow, on the bottom and the right.
911 @item topShadowColor
912 The color for the border shadow, on the top and the left.
913 @end table