Merge from emacs-23
[bpt/emacs.git] / doc / emacs / xresources.texi
index f471b9d..89ec08d 100644 (file)
@@ -1,6 +1,6 @@
 @c This is part of the Emacs manual.
 @c Copyright (C) 1987, 1993, 1994, 1995, 1997, 2001, 2002, 2003,
-@c   2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+@c   2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node X Resources, Antinews, Emacs Invocation, Top
 @appendix X Options and Resources
@@ -107,11 +107,19 @@ emacs.borderWidth: 4
 @end ifnottex
 
   The order in which the lines appear in the file does not matter.
-Also, command-line options always override the X resources file.
+One way to experiment with the effect of different resource settings
+is to use the @code{editres} program.  See the @code{editres} man page
+for more details.
+
+  Emacs does not process X resources at all if you set the variable
+@code{inhibit-x-resources} to a non-@code{nil} value, or if you
+specify the @samp{-Q} (or @samp{--quick}) command-line argument
+(@pxref{Initial Options}).  (The @samp{-Q} argument automatically sets
+@code{inhibit-x-resources} to @code{t}.)
 
 @ifnottex
-  The following X command-line options affect how X resources are
-processed:
+  In addition, you can use the following command-line options to
+override the X resources file:
 
 @table @samp
 @item -name @var{name}
@@ -150,10 +158,6 @@ other resource specifications.
 @end table
 @end ifnottex
 
-  One way to experiment with the effect of different resource settings
-is to use the @code{editres} program.  See the @code{editres} man page
-for more details.
-
 @node Table of Resources
 @appendixsec Table of X Resources for Emacs
 
@@ -189,7 +193,7 @@ Specifies whether to make the cursor blink. The default is @samp{on}.  Use
 @end ifnottex
 
 @item @code{font} (class @code{Font})
-Font name for the @code{default} font.  @xref{Font X}.  You can also
+Font name for the @code{default} font.  @xref{Fonts}.  You can also
 specify a fontset name (@pxref{Fontsets}).
 
 @item @code{fontBackend} (class @code{FontBackend})
@@ -303,12 +307,14 @@ Name to display in the title bar of the initial Emacs frame.
 @item @code{toolBar} (class @code{ToolBar})
 @cindex tool bar
 Number of lines to reserve for the tool bar.  A zero value suppresses
-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.
+the tool bar.  For the Emacs tool bar (i.e. not Gtk+), 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}.
+For the Gtk+ tool bar, any non-zero value means on and
+@code{auto-resize-tool-bars} has no effect.
 
 @item @code{useXIM} (class @code{UseXIM})
 @cindex XIM
@@ -393,8 +399,9 @@ Italic flag for face @var{face}---instead of @code{attributeSlant}.
 @end table
 
 @node Lucid Resources
-@appendixsec Lucid Menu X Resources
+@appendixsec Lucid Menu And Dialog X Resources
 @cindex Menu X Resources (Lucid widgets)
+@cindex Dialog X Resources (Lucid widgets)
 @cindex Lucid Widget X Resources
 
 @ifnottex
@@ -409,7 +416,7 @@ Emacs.pane.menubar.@var{resource}:  @var{value}
 @end example
 
 @noindent
-For example, to specify the font @samp{8x16} for the menu-bar items,
+For example, to specify the font @samp{Courier-12} for the menu-bar items,
 write this:
 @end ifnottex
 @iftex
@@ -417,32 +424,37 @@ write this:
 with the Lucid menu widgets, then the menu bar is a separate widget
 and has its own resources.  The resource specifications start with
 @samp{Emacs.pane.menubar}---for instance, to specify the font
-@samp{8x16} for the menu-bar items, write this:
+@samp{Courier-12} for the menu-bar items, write this:
 @end iftex
 
 @example
-Emacs.pane.menubar.font:  8x16
+Emacs.pane.menubar.faceName:  Courier-12
 @end example
 
 @noindent
-Resources for @emph{non-menubar} toolkit pop-up menus have
-@samp{menu*} instead of @samp{pane.menubar}.  For example, to specify
-the font @samp{8x16} for the pop-up menu items, write this:
+To specify a font, use fontconfig font names as values to the @code{faceName}
+resource.
+
+If Emacs is not built with the Xft library, Lucid menus and dialogs
+can only display old style fonts.  If Emacs is built with Xft and you
+prefer the old fonts, you have to specify @samp{none} to
+@code{faceName}:
 
 @example
-Emacs.menu*.font:      8x16
+Emacs.pane.menubar.faceName:    none
+Emacs.pane.dialog.faceName:     none
 @end example
 
 @noindent
-For dialog boxes, use @samp{dialog*}:
+To specify a non-Xft font, use @code{font}.  For example:
 
 @example
-Emacs.dialog*.font:    8x16
+Emacs.pane.menubar.font: lucidasanstypewriter-10
 @end example
 
 @noindent
-The Lucid menus can display multilingual text in your locale.  For
-more information about fontsets see the man page for
+The Lucid menus can display multilingual text in your locale with old style
+fonts.  For more information about fontsets see the man page for
 @code{XCreateFontSet}.  To enable multilingual menu text you specify a
 @code{fontSet} resource instead of the font resource.  If both
 @code{font} and @code{fontSet} resources are specified, the
@@ -455,6 +467,22 @@ for both the popup and menu bar menus, write this:
 Emacs*menu*fontSet:  -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*
 @end example
 
+@noindent
+Resources for @emph{non-menubar} toolkit pop-up menus have
+@samp{menu*} instead of @samp{pane.menubar}.  For example, to specify
+the font @samp{8x16} for the pop-up menu items, write this:
+
+@example
+Emacs.menu*.font:       8x16
+@end example
+
+@noindent
+For dialog boxes, use @samp{dialog*}:
+
+@example
+Emacs.dialog*.faceName: Sans-12
+@end example
+
 @noindent
 The @samp{*menu*} as a wildcard matches @samp{pane.menubar} and
 @samp{menu@dots{}}.
@@ -467,6 +495,8 @@ approach should work on both kinds of systems.
   Here is a list of the specific resources for menu bars and pop-up menus:
 
 @table @code
+@item faceName
+Xft font for menu item text.
 @item font
 Font for menu item text.
 @item fontSet