aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-05-12 03:18:03 +0000
committerChong Yidong2009-05-12 03:18:03 +0000
commitac36a8f1e79c4aabd2d203b4ec0daf245bee99df (patch)
treef25ccfc9c512221a75328214536c2a7b549b872d
parentf7a0bea3b320cee465b5a68b7e05157e69e7732e (diff)
downloademacs-ac36a8f1e79c4aabd2d203b4ec0daf245bee99df.tar.gz
emacs-ac36a8f1e79c4aabd2d203b4ec0daf245bee99df.zip
* xresources.texi (Resources): Simplify descriptions. Shorten
description of editres, which is not very useful these days. (Table of Resources): Document fontBackend resource.
-rw-r--r--doc/emacs/ChangeLog4
-rw-r--r--doc/emacs/xresources.texi170
2 files changed, 79 insertions, 95 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 566a60715ca..352ce8feaf1 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,5 +1,9 @@
12009-05-12 Chong Yidong <cyd@stupidchicken.com> 12009-05-12 Chong Yidong <cyd@stupidchicken.com>
2 2
3 * xresources.texi (Resources): Simplify descriptions. Shorten
4 description of editres, which is not very useful these days.
5 (Table of Resources): Document fontBackend resource.
6
3 * trouble.texi (Quitting): Add other undo bindings to table. 7 * trouble.texi (Quitting): Add other undo bindings to table.
4 (DEL Does Not Delete): Note that the erasure key is usually labelled 8 (DEL Does Not Delete): Note that the erasure key is usually labelled
5 "Backspace". Remove discussion of obscure Xmodmap issue. 9 "Backspace". Remove discussion of obscure Xmodmap issue.
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi
index e0c95bace59..a2deb1530ae 100644
--- a/doc/emacs/xresources.texi
+++ b/doc/emacs/xresources.texi
@@ -10,7 +10,7 @@ resources, as is usual for programs that use X. On MS-Windows, you
10can customize some of the same aspects using the system registry. 10can customize some of the same aspects using the system registry.
11@xref{MS-Windows Registry}. 11@xref{MS-Windows Registry}.
12 12
13o When Emacs is built using an ``X toolkit'', such as Lucid or 13 When Emacs is built using an ``X toolkit'', such as Lucid or
14LessTif, you need to use X resources to customize the appearance of 14LessTif, you need to use X resources to customize the appearance of
15the widgets, including the menu-bar, scroll-bar, and dialog boxes. 15the widgets, including the menu-bar, scroll-bar, and dialog boxes.
16This is because the libraries that implement these don't provide for 16This is because the libraries that implement these don't provide for
@@ -45,63 +45,49 @@ manual.
45 45
46 Programs running under the X Window System organize their user 46 Programs running under the X Window System organize their user
47options under a hierarchy of classes and resources. You can specify 47options under a hierarchy of classes and resources. You can specify
48default values for these options in your X resources file, usually 48default values for these options in your @dfn{X resource file},
49named @file{~/.Xdefaults} or @file{~/.Xresources}. 49usually named @file{~/.Xdefaults} or @file{~/.Xresources}. Changes in
50If changes in @file{~/.Xdefaults} do not 50this file do not take effect immediately, because the X server stores
51take effect, it is because your X server stores its own list of 51its own list of resources; to update it, use the command
52resources; to update them, use the shell command @command{xrdb}---for 52@command{xrdb}---for instance, @samp{xrdb ~/.Xdefaults}.
53instance, @samp{xrdb ~/.Xdefaults}.
54
55 Each line in the file specifies a value for one option or for a
56collection of related options, for one program or for several programs
57(optionally even for all programs).
58 53
59@cindex Registry (MS-Windows) 54@cindex Registry (MS-Windows)
60 MS-Windows systems do not support @file{~/.Xdefaults} files, so 55 (MS-Windows systems do not support X resource files; on Windows,
61instead Emacs compiled for Windows looks for X resources in the 56Emacs looks for X resources in the Windows Registry, first under the
62Windows Registry, first under the key 57key @samp{HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs} and then under the key
63@samp{HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs} and then under the key
64@samp{HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs}. The menu and scroll 58@samp{HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs}. The menu and scroll
65bars are native widgets on MS-Windows, so they are only customizable 59bars are native widgets on MS-Windows, so they are only customizable
66via the system-wide settings in the Display Control Panel. You can 60via the system-wide settings in the Display Control Panel. You can
67also set resources using the @samp{-xrm} command line option (see 61also set resources using the @samp{-xrm} command line option, as
68below.) 62explained below.)
69
70@iftex
71 Applications such as Emacs look for resources with specific names
72and their particular meanings. Case distinctions are significant in
73these names. Each resource specification in @file{~/.Xdefaults}
74states the name of the program and the name of the resource. For
75Emacs, the program name is @samp{Emacs}. It looks like this:
76 63
77@example 64 Each line in the X resource file specifies a value for one option or
78Emacs.borderWidth: 2 65for a collection of related options. Each resource specification
79@end example 66consists of a @dfn{program name} and a @dfn{resource name}. Case
80@end iftex 67distinctions are significant in each of these names. Here is an
81@ifnottex 68example:
82 Programs define named resources with particular meanings. They also
83define how to group resources into named classes. For instance, in
84Emacs, the @samp{internalBorder} resource controls the width of the
85internal border, and the @samp{borderWidth} resource controls the width
86of the external border. Both of these resources are part of the
87@samp{BorderWidth} class. Case distinctions are significant in these
88names.
89
90 Every resource definition is associated with a specific program
91name---the name of the executable file that you ran. For Emacs, that
92is normally @samp{emacs}. To specify a definition for all instances
93of Emacs, regardless of their names, use @samp{Emacs}.
94
95 In @file{~/.Xdefaults}, you can specify a value for a single resource
96on one line, like this:
97 69
98@example 70@example
99emacs.borderWidth: 2 71emacs.borderWidth: 2
100@end example 72@end example
101 73
102@noindent 74@ifnottex
103Or you can use a class name to specify the same value for all resources 75 The program name is the name of the executable file to which the
104in that class. Here's an example: 76resource applies. For Emacs, this is normally @samp{emacs}. To
77specify a definition that applies to all instances of Emacs,
78regardless of the name of the Emacs executable, use @samp{Emacs}.
79
80 The resource name is the name of a program setting. For instance,
81Emacs recognizes a @samp{borderWidth} resource that controls the width
82of the external border for graphical frames.
83
84 Resources are grouped into named classes. For instance, the
85@samp{BorderWidth} class contains both the @samp{borderWidth} resource
86(which we just described), as well as the @samp{internalBorder}
87resource, which controls the width of the internal border for
88graphical frames. Instead of using a resource name, you can use a
89class name to specify the same value for all resources in that class.
90Here's an example:
105 91
106@example 92@example
107emacs.BorderWidth: 2 93emacs.BorderWidth: 2
@@ -109,9 +95,10 @@ emacs.BorderWidth: 2
109 95
110 If you specify a value for a class, it becomes the default for all 96 If you specify a value for a class, it becomes the default for all
111resources in that class. You can specify values for individual 97resources in that class. You can specify values for individual
112resources as well; these override the class value, for those particular 98resources as well; these override the class value, for those
113resources. Thus, this example specifies 2 as the default width for all 99particular resources. The following example specifies 2 as the
114borders, but overrides this value with 4 for the external border: 100default width for all borders, but overrides this value with 4 for the
101external border:
115 102
116@example 103@example
117emacs.BorderWidth: 2 104emacs.BorderWidth: 2
@@ -123,66 +110,49 @@ emacs.borderWidth: 4
123Also, command-line options always override the X resources file. 110Also, command-line options always override the X resources file.
124 111
125@ifnottex 112@ifnottex
126Here is a list of X command-line options and their corresponding 113 The following X command-line options affect how X resources are
127resource names. 114processed:
128 115
129@table @samp 116@table @samp
130@item -name @var{name} 117@item -name @var{name}
131@opindex --name 118@opindex --name
132@itemx --name=@var{name} 119@itemx --name=@var{name}
133@cindex resource name, command-line argument 120@cindex resource name, command-line argument
134Use @var{name} as the resource name (and the title) for the initial 121This option sets the program name of the initial Emacs frame to
135Emacs frame. This option does not affect subsequent frames, but Lisp 122@var{name}. It also sets the title of the initial frame to
136programs can specify frame names when they create frames. 123@var{name}. This option does not affect subsequent frames.
137 124
138If you don't specify this option, the default is to use the Emacs 125If you don't specify this option, the default is to use the Emacs
139executable's name as the resource name. 126executable's name as the program name.
127
128For consistency, @samp{-name} also specifies the name to use for other
129resource values that do not belong to any particular frame.
130
131The resources that name Emacs invocations also belong to a class,
132named @samp{Emacs}. If you write @samp{Emacs} instead of
133@samp{emacs}, the resource applies to all frames in all Emacs jobs,
134regardless of frame titles and regardless of the name of the
135executable file.
140 136
141@item -xrm @var{resource-values} 137@item -xrm @var{resource-values}
142@opindex --xrm 138@opindex --xrm
143@itemx --xrm=@var{resource-values} 139@itemx --xrm=@var{resource-values}
144@cindex resource values, command-line argument 140@cindex resource values, command-line argument
145Specify X resource values for this Emacs job (see below). 141This option specifies X resource values for the present Emacs job.
142
143@var{resource-values} should have the same format that you would use
144inside a file of X resources. To include multiple resource
145specifications in @var{resource-values}, put a newline between them,
146just as you would in a file. You can also use @samp{#include
147"@var{filename}"} to include a file full of resource specifications.
148Resource values specified with @samp{-xrm} take precedence over all
149other resource specifications.
146@end table 150@end table
147 151@end ifnottex
148 For consistency, @samp{-name} also specifies the name to use for
149other resource values that do not belong to any particular frame.
150
151 The resources that name Emacs invocations also belong to a class; its
152name is @samp{Emacs}. If you write @samp{Emacs} instead of
153@samp{emacs}, the resource applies to all frames in all Emacs jobs,
154regardless of frame titles and regardless of the name of the executable
155file. Here is an example:
156
157@example
158Emacs.BorderWidth: 2
159Emacs.borderWidth: 4
160@end example
161
162 You can specify a string of additional resource values for Emacs to
163use with the command line option @samp{-xrm @var{resources}}. The text
164@var{resources} should have the same format that you would use inside a file
165of X resources. To include multiple resource specifications in
166@var{resources}, put a newline between them, just as you would in a file.
167You can also use @samp{#include "@var{filename}"} to include a file full
168of resource specifications. Resource values specified with @samp{-xrm}
169take precedence over all other resource specifications.
170 152
171 One way to experiment with the effect of different resource settings 153 One way to experiment with the effect of different resource settings
172is to use the @code{editres} program. Select @samp{Get Tree} from the 154is to use the @code{editres} program. See the @code{editres} man page
173@end ifnottex 155for more details.
174@iftex
175 You can experiment with the effect of different resource settings
176with the @code{editres} program. Select @samp{Get Tree} from the
177@end iftex
178@samp{Commands} menu, then click on an Emacs frame. This will display
179a tree showing the structure of X toolkit widgets used in an Emacs
180frame. Select one of them, such as @samp{menubar}, then select
181@samp{Show Resource Box} from the @samp{Commands} menu. This displays
182a list of all the meaningful X resources for that widget, and allows
183you to edit them. Changes take effect when you click on the
184@samp{Apply} button. (See the @code{editres} man page for more
185details.)
186 156
187@node Table of Resources 157@node Table of Resources
188@appendixsec Table of X Resources for Emacs 158@appendixsec Table of X Resources for Emacs
@@ -219,7 +189,17 @@ Specifies whether to make the cursor blink. The default is @samp{on}. Use
219@end ifnottex 189@end ifnottex
220 190
221@item @code{font} (class @code{Font}) 191@item @code{font} (class @code{Font})
222Font name (or fontset name, @pxref{Fontsets}) for @code{default} font. 192Font name for the @code{default} font. @xref{Font X}. You can also
193specify a fontset name (@pxref{Fontsets}).
194
195@item @code{fontBackend} (class @code{FontBackend})
196The backend(s) to use for drawing fonts; if multiple backends are
197specified, they must be comma-delimited and given in order of
198precedence. On X, for instance, the value @samp{x,xft} tells Emacs to
199draw fonts using the X core font driver, falling back on the Xft font
200driver if that fails. Normally, you can leave this resource unset, in
201which case Emacs tries using all font backends available on your
202graphical device.
223 203
224@item @code{foreground} (class @code{Foreground}) 204@item @code{foreground} (class @code{Foreground})
225Color name for text. 205Color name for text.