aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-04-23 21:51:55 +0000
committerRichard M. Stallman2006-04-23 21:51:55 +0000
commit2018683fd4a4e59458ac812b1848068d470f0c74 (patch)
tree0de8f0c006033c0fc6537a7052649cffa6e6111e
parent8c04e197f2afb2032ab58707148f7ffad44b9465 (diff)
downloademacs-2018683fd4a4e59458ac812b1848068d470f0c74.tar.gz
emacs-2018683fd4a4e59458ac812b1848068d470f0c74.zip
New file, a shortened version of xresmini.texi.
-rw-r--r--man/xresmini.texi299
1 files changed, 299 insertions, 0 deletions
diff --git a/man/xresmini.texi b/man/xresmini.texi
new file mode 100644
index 00000000000..d25be5e1091
--- /dev/null
+++ b/man/xresmini.texi
@@ -0,0 +1,299 @@
1@c This is part of the Emacs manual.
2@c Copyright (C) 1987, 1993, 1994, 1995, 1997, 2001, 2002, 2003,
3@c 2004, 2005, 2006 Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions.
5@node X Resources, Antinews, Emacs Invocation, Top
6@appendix X Options and Resources
7
8 You can customize some X-related aspects of Emacs behavior using X
9resources, as is usual for programs that use X. On MS-Windows, you
10can customize some of the same aspects using the system registry.
11@xref{MS-Windows Registry}. Likewise, Emacs on MacOS Carbon emulates X
12resources using the Preferences system. @xref{Mac Environment Variables}.
13
14 When Emacs is built using an ``X toolkit'', such as Lucid or
15LessTif, you need to use X resources to customize the appearance of
16the widgets, including the menu-bar, scroll-bar, and dialog boxes.
17This is because the libraries that implement these don't provide for
18customization through Emacs. GTK+ widgets use a separate system of
19``GTK resources''. In this chapter we describe the most commonly used
20resource specifications. For full documentation, see the online
21manual.
22
23@c Add xref for LessTif/Motif menu resources.
24
25@menu
26* Resources:: Using X resources with Emacs (in general).
27* Table of Resources:: Table of specific X resources that affect Emacs.
28* Face Resources:: X resources for customizing faces.
29* Lucid Resources:: X resources for Lucid menus.
30* GTK resources:: Resources for GTK widgets.
31@end menu
32
33@node Resources
34@appendixsec X Resources
35@cindex resources
36@cindex X resources
37@cindex @file{~/.Xdefaults} file
38@cindex @file{~/.Xresources} file
39
40 Programs running under the X Window System organize their user
41options under a hierarchy of classes and resources. You can specify
42default values for these options in your X resources file, usually
43named @file{~/.Xdefaults} or @file{~/.Xresources}.
44If changes in @file{~/.Xdefaults} do not
45take effect, it is because your X server stores its own list of
46resources; to update them, use the shell command @command{xrdb}---for
47instance, @samp{xrdb ~/.Xdefaults}.
48
49 Each line in the file specifies a value for one option or for a
50collection of related options, for one program or for several programs
51(optionally even for all programs).
52
53@cindex Registry (MS-Windows)
54 MS-Windows systems don't support @file{~/.Xdefaults} files, but
55Emacs compiled for Windows looks for X resources in the Windows
56Registry, under the key @samp{HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs}
57and then under the key @samp{HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs}.
58The menu and scrollbars are native widgets on MS-Windows, so they are
59only customizable via the system-wide settings in the Display Control
60Panel. You can also set resources using the @samp{-xrm} command line
61option (see below.)
62
63 Applications such as Emacs look for resources with specific names
64and their particular meanings. Case distinctions are significant in
65these names. Each resource specification in @file{~/.Xdefaults}
66states the name of the program and the name of the resource. For
67Emacs, the program name is @samp{Emacs}. It looks like this:
68
69@example
70Emacs.borderWidth: 2
71@end example
72
73 The order in which the lines appear in the file does not matter.
74Also, command-line options always override the X resources file.
75
76 You can experiment with the effect of different resource settings
77with the @code{editres} program. Select @samp{Get Tree} from the
78@samp{Commands} menu, then click on an Emacs frame. This will display
79a tree showing the structure of X toolkit widgets used in an Emacs
80frame. Select one of them, such as @samp{menubar}, then select
81@samp{Show Resource Box} from the @samp{Commands} menu. This displays
82a list of all the meaningful X resources for that widget, and allows
83you to edit them. Changes take effect when you click on the
84@samp{Apply} button. (See the @code{editres} man page for more
85details.)
86
87@node Table of Resources
88@appendixsec Table of X Resources for Emacs
89
90 This table lists the resource names that designate options for
91Emacs, not counting those for the appearance of the menu bar, each
92with the class that it belongs to:
93
94@table @asis
95@item @code{background} (class @code{Background})
96Background color name.
97
98@item @code{borderColor} (class @code{BorderColor})
99Color name for the external border.
100
101@item @code{cursorColor} (class @code{Foreground})
102Color name for text cursor (point).
103
104@item @code{font} (class @code{Font})
105Font name (or fontset name, @pxref{Fontsets}) for @code{default} font.
106
107@item @code{foreground} (class @code{Foreground})
108Color name for text.
109
110@item @code{geometry} (class @code{Geometry})
111Window size and position. Be careful not to specify this resource as
112@samp{emacs*geometry}, because that may affect individual menus as well
113as the Emacs frame itself.
114
115If this resource specifies a position, that position applies only to the
116initial Emacs frame (or, in the case of a resource for a specific frame
117name, only that frame). However, the size, if specified here, applies to
118all frames.
119
120@item @code{iconName} (class @code{Title})
121Name to display in the icon.
122
123@item @code{internalBorder} (class @code{BorderWidth})
124Width in pixels of the internal border.
125
126@item @code{lineSpacing} (class @code{LineSpacing})
127@cindex line spacing
128@cindex leading
129Additional space (@dfn{leading}) between lines, in pixels.
130
131@item @code{menuBar} (class @code{MenuBar})
132@cindex menu bar
133Give frames menu bars if @samp{on}; don't have menu bars if
134@samp{off}. @xref{Lucid Resources}, and @ref{LessTif Resources}, for
135how to control the appearance of the menu bar if you have one.
136
137@item @code{pointerColor} (class @code{Foreground})
138Color of the mouse cursor.
139
140@item @code{screenGamma} (class @code{ScreenGamma})
141@cindex gamma correction
142Gamma correction for colors, equivalent to the frame parameter
143@code{screen-gamma}.
144
145@item @code{title} (class @code{Title})
146Name to display in the title bar of the initial Emacs frame.
147
148@item @code{toolBar} (class @code{ToolBar})
149@cindex tool bar
150Number of lines to reserve for the tool bar. A zero value suppresses
151the tool bar. If the value is non-zero and
152@code{auto-resize-tool-bars} is non-@code{nil}, the tool bar's size
153will be changed automatically so that all tool bar items are visible.
154
155@item @code{useXIM} (class @code{UseXIM})
156@cindex XIM
157@cindex X input methods
158@cindex input methods, X
159Turn off use of X input methods (XIM) if @samp{false} or @samp{off}.
160This is only relevant if your Emacs is actually built with XIM
161support. It is potentially useful to turn off XIM for efficiency,
162especially slow X client/server links.
163
164@item @code{verticalScrollBars} (class @code{ScrollBars})
165Give frames scroll bars if @samp{on}; don't have scroll bars if
166@samp{off}.
167@end table
168
169@node Face Resources
170@appendixsec X Resources for Faces
171
172 You can use resources to customize the appearance of particular
173faces (@pxref{Faces}):
174
175@table @code
176@item @var{face}.attributeForeground
177Foreground color for face @var{face}.
178@item @var{face}.attributeBackground
179Background color for face @var{face}.
180@item @var{face}.attributeUnderline
181Underline flag for face @var{face}. Use @samp{on} or @samp{true} for
182yes.
183@item @var{face}.attributeStrikeThrough
184@itemx @var{face}.attributeOverline
185@itemx @var{face}.attributeBox
186@itemx @var{face}.attributeInverse
187Likewise, for other boolean font attributes.
188@item @var{face}.attributeStipple
189The name of a pixmap data file to use for the stipple pattern, or
190@code{false} to not use stipple for the face @var{face}.
191@item @var{face}.attributeBackgroundPixmap
192The background pixmap for the face @var{face}. Should be a name of a
193pixmap file or @code{false}.
194@item @var{face}.attributeFont
195Font name (full XFD name or valid X abbreviation) for face @var{face}.
196Instead of this, you can specify the font through separate attributes.
197@end table
198
199 Instead of using @code{attributeFont} to specify a font name, you can
200select a font through these separate attributes:
201
202@table @code
203@item @var{face}.attributeFamily
204Font family for face @var{face}.
205@item @var{face}.attributeHeight
206Height of the font to use for face @var{face}: either an integer
207specifying the height in units of 1/10@dmn{pt}, or a floating point
208number that specifies a scale factor to scale the underlying face's
209default font, or a function to be called with the default height which
210will return a new height.
211@item @var{face}.attributeWidth
212@itemx @var{face}.attributeWeight
213@itemx @var{face}.attributeSlant
214Each of these resources corresponds to a like-named font attribute,
215and you write the resource value the same as the symbol you would use
216for the font attribute value.
217@item @var{face}.attributeBold
218Bold flag for face @var{face}---instead of @code{attributeWeight}. Use @samp{on} or @samp{true} for
219yes.
220@item @var{face}.attributeItalic
221Italic flag for face @var{face}---instead of @code{attributeSlant}.
222@end table
223
224@node Lucid Resources
225@appendixsec Lucid Menu X Resources
226@cindex Menu X Resources (Lucid widgets)
227@cindex Lucid Widget X Resources
228
229 If the Emacs installed at your site was built to use the X toolkit
230with the Lucid menu widgets, then the menu bar is a separate widget
231and has its own resources. The resource specifications start with
232@samp{Emacs.pane.menubar}---for instance, to specify the font
233@samp{8x16} for the menu-bar items, write this:
234
235@example
236Emacs.pane.menubar.font: 8x16
237@end example
238
239@noindent
240Resources for @emph{non-menubar} toolkit pop-up menus have
241@samp{menu*} instead of @samp{pane.menubar}. For example, to specify
242the font @samp{8x16} for the pop-up menu items, write this:
243
244@example
245Emacs.menu*.font: 8x16
246@end example
247
248@noindent
249For dialog boxes, use @samp{dialog*}:
250
251@example
252Emacs.dialog*.font: 8x16
253@end example
254
255@noindent
256The Lucid menus can display multilingual text in your locale. For
257more information about fontsets see the man page for
258@code{XCreateFontSet}. To enable multilingual menu text you specify a
259@code{fontSet} resource instead of the font resource. If both
260@code{font} and @code{fontSet} resources are specified, the
261@code{fontSet} resource is used.
262
263 Thus, to specify @samp{-*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*}
264for both the popup and menu bar menus, write this:
265
266@example
267Emacs*menu*fontSet: -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*
268@end example
269
270@noindent
271The @samp{*menu*} as a wildcard matches @samp{pane.menubar} and
272@samp{menu@dots{}}.
273
274 Experience shows that on some systems you may need to add
275@samp{shell.}@: before the @samp{pane.menubar} or @samp{menu*}. On
276some other systems, you must not add @samp{shell.}. The generic wildcard
277approach should work on both kinds of systems.
278
279 Here is a list of the specific resources for menu bars and pop-up menus:
280
281@table @code
282@item font
283Font for menu item text.
284@item fontSet
285Fontset for menu item text.
286@item foreground
287Color of the foreground.
288@item background
289Color of the background.
290@item buttonForeground
291In the menu bar, the color of the foreground for a selected item.
292@item margin
293The margin of the menu bar, in characters. Default is 1.
294@end table
295
296@node GTK resources
297@appendixsec GTK resources
298
299@c Waiting for contents