@c This is part of the Emacs manual.
@c Copyright (C) 1987, 1993, 1994, 1995, 1997, 2001, 2002, 2003,
-@c 2004, 2005, 2006 Free Software Foundation, Inc.
+@c 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node X Resources, Antinews, Emacs Invocation, Top
@appendix X Options and Resources
@xref{MS-Windows Registry}. Likewise, Emacs on MacOS Carbon emulates X
resources using the Preferences system. @xref{Mac Environment Variables}.
- When Emacs is built using an ``X toolkit'', such as Lucid or
+ When Emacs is built using an ``X toolkit'', such as Lucid or
LessTif, you need to use X resources to customize the appearance of
the widgets, including the menu-bar, scroll-bar, and dialog boxes.
This is because the libraries that implement these don't provide for
(optionally even for all programs).
@cindex Registry (MS-Windows)
- MS-Windows systems don't support @file{~/.Xdefaults} files, but
-Emacs compiled for Windows looks for X resources in the Windows
-Registry, under the key @samp{HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs}
-and then under the key @samp{HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs}.
-The menu and scrollbars are native widgets on MS-Windows, so they are
-only customizable via the system-wide settings in the Display Control
-Panel. You can also set resources using the @samp{-xrm} command line
-option (see below.)
+ MS-Windows systems do not support @file{~/.Xdefaults} files, so
+instead Emacs compiled for Windows looks for X resources in the
+Windows Registry, first under the key
+@samp{HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs} and then under the key
+@samp{HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs}. The menu and scroll
+bars are native widgets on MS-Windows, so they are only customizable
+via the system-wide settings in the Display Control Panel. You can
+also set resources using the @samp{-xrm} command line option (see
+below.)
@iftex
Applications such as Emacs look for resources with specific names
these names. Each resource specification in @file{~/.Xdefaults}
states the name of the program and the name of the resource. For
Emacs, the program name is @samp{Emacs}. It looks like this:
-
+
@example
Emacs.borderWidth: 2
@end example
Gamma correction for colors, equivalent to the frame parameter
@code{screen-gamma}.
+@item @code{scrollBarWidth} (class @code{ScrollBarWidth})
+@cindex scrollbar width
+The scroll bar width in pixels, equivalent to the frame parameter
+@code{scroll-bar-width}.
+
@ifnottex
@item @code{selectionFont} (class @code{SelectionFont})
Font name for pop-up menu items, in non-toolkit versions of Emacs. (For
the tool bar. If the value is non-zero and
@code{auto-resize-tool-bars} is non-@code{nil}, the tool bar's size
will be changed automatically so that all tool bar items are visible.
+ If the value of @code{auto-resize-tool-bars} is @code{grow-only},
+the tool bar expands automatically, but does not contract automatically.
+To contract the tool bar, you must redraw the frame by entering @kbd{C-l}.
@item @code{useXIM} (class @code{UseXIM})
@cindex XIM
@noindent
Resources for @emph{non-menubar} toolkit pop-up menus have
-@samp{menu*} instead of @samp{pane.menubar}. For example, to specify
+@samp{menu*} instead of @samp{pane.menubar}. For example, to specify
the font @samp{8x16} for the pop-up menu items, write this:
@example
widget "Emacs.pane.menubar" style "my_style"
widget "Emacs.pane.emacs.verticalScrollBar" style "my_style"
@end smallexample
-
+
But to avoid having to type it all, wildcards are often used. @samp{*}
matches zero or more characters and @samp{?} matches one character. So "*"
matches all widgets.