diff options
| author | Chong Yidong | 2012-04-12 22:50:58 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-04-12 22:50:58 +0800 |
| commit | 81927dd2a4205aa38bc5aaa37eb3aa8ab57fb8de (patch) | |
| tree | bce00e596f093cd9d095cccf87f3e71d622c7c87 | |
| parent | 893585f47bb9e25d39df66fef9674b6baa25e57e (diff) | |
| download | emacs-81927dd2a4205aa38bc5aaa37eb3aa8ab57fb8de.tar.gz emacs-81927dd2a4205aa38bc5aaa37eb3aa8ab57fb8de.zip | |
New Lisp manual nodes, Applying Customizations and Custom Themes.
* doc/lispref/customize.texi (Applying Customizations):
(Custom Themes): New nodes.
* doc/lispref/display.texi (Defining Faces): Reference custom-set-faces.
* doc/lispref/modes.texi (Defining Minor Modes, Defining Minor Modes):
* doc/lispref/os.texi (Startup Summary): Copyedits.
* doc/emacs/custom.texi (Creating Custom Themes): Add reference to Custom
Themes node in Lisp manual.
* lisp/custom.el (custom-theme-set-variables): Doc fix.
| -rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/custom.texi | 5 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 10 | ||||
| -rw-r--r-- | doc/lispref/customize.texi | 158 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 59 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/modes.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/vol1.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/vol2.texi | 6 | ||||
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/custom.el | 21 |
12 files changed, 230 insertions, 62 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 8f384720170..5b4ab363202 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-04-12 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * custom.texi (Creating Custom Themes): Add reference to Custom | ||
| 4 | Themes node in Lisp manual. | ||
| 5 | |||
| 1 | 2012-04-12 Glenn Morris <rgm@gnu.org> | 6 | 2012-04-12 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * mule.texi (International): Copyedits. | 8 | * mule.texi (International): Copyedits. |
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 6bc96bda9ca..72b4961e209 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -684,9 +684,8 @@ the @samp{[Merge Theme]} button and specifying the special theme named | |||
| 684 | A theme file is simply an Emacs Lisp source file, and loading the | 684 | A theme file is simply an Emacs Lisp source file, and loading the |
| 685 | Custom theme works by loading the Lisp file. Therefore, you can edit | 685 | Custom theme works by loading the Lisp file. Therefore, you can edit |
| 686 | a theme file directly instead of using the @file{*Custom Theme*} | 686 | a theme file directly instead of using the @file{*Custom Theme*} |
| 687 | buffer. | 687 | buffer. @xref{Custom Themes,,, elisp, The Emacs Lisp Reference |
| 688 | @c Add link to the relevant Emacs Lisp Reference manual node, once | 688 | Manual}, for details. |
| 689 | @c that is written. | ||
| 690 | 689 | ||
| 691 | @node Variables | 690 | @node Variables |
| 692 | @section Variables | 691 | @section Variables |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 3990db3d602..21050287fcc 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2012-04-12 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * customize.texi (Applying Customizations): | ||
| 4 | (Custom Themes): New nodes. | ||
| 5 | |||
| 6 | * display.texi (Defining Faces): Reference custom-set-faces. | ||
| 7 | |||
| 8 | * modes.texi (Defining Minor Modes, Defining Minor Modes): | ||
| 9 | * os.texi (Startup Summary): Copyedits. | ||
| 10 | |||
| 1 | 2012-04-12 Glenn Morris <rgm@gnu.org> | 11 | 2012-04-12 Glenn Morris <rgm@gnu.org> |
| 2 | 12 | ||
| 3 | * loading.texi (Loading Non-ASCII): "unibyte:" can also be at the end. | 13 | * loading.texi (Loading Non-ASCII): "unibyte:" can also be at the end. |
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 167dfe7d4c5..7e6b9ad40ac 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi | |||
| @@ -4,20 +4,25 @@ | |||
| 4 | @c See the file elisp.texi for copying conditions. | 4 | @c See the file elisp.texi for copying conditions. |
| 5 | @setfilename ../../info/customize | 5 | @setfilename ../../info/customize |
| 6 | @node Customization, Loading, Macros, Top | 6 | @node Customization, Loading, Macros, Top |
| 7 | @chapter Writing Customization Definitions | 7 | @chapter Customization Settings |
| 8 | 8 | ||
| 9 | @cindex customization definitions | 9 | @cindex customization item |
| 10 | This chapter describes how to declare user options for customization, | 10 | This chapter describes how to declare customizable variables and |
| 11 | and also customization groups for classifying them. We use the term | 11 | customization groups for classifying them. We use the term |
| 12 | @dfn{customization item} to include both kinds of customization | 12 | @dfn{customization item} to include customizable variables, |
| 13 | definitions---as well as face definitions (@pxref{Defining Faces}). | 13 | customization groups, as well as faces. |
| 14 | |||
| 15 | @xref{Defining Faces}, for the @code{defface} macro, which is used | ||
| 16 | for declaring customizable faces. | ||
| 14 | 17 | ||
| 15 | @menu | 18 | @menu |
| 16 | * Common Keywords:: Common keyword arguments for all kinds of | 19 | * Common Keywords:: Common keyword arguments for all kinds of |
| 17 | customization declarations. | 20 | customization declarations. |
| 18 | * Group Definitions:: Writing customization group definitions. | 21 | * Group Definitions:: Writing customization group definitions. |
| 19 | * Variable Definitions:: Declaring user options. | 22 | * Variable Definitions:: Declaring user options. |
| 20 | * Customization Types:: Specifying the type of a user option. | 23 | * Customization Types:: Specifying the type of a user option. |
| 24 | * Applying Customizations:: Functions to apply customization settings. | ||
| 25 | * Custom Themes:: Writing Custom themes. | ||
| 21 | @end menu | 26 | @end menu |
| 22 | 27 | ||
| 23 | @node Common Keywords | 28 | @node Common Keywords |
| @@ -306,7 +311,7 @@ individual types for a description of how to use @code{:options}. | |||
| 306 | @item :set @var{setfunction} | 311 | @item :set @var{setfunction} |
| 307 | @kindex set@r{, @code{defcustom} keyword} | 312 | @kindex set@r{, @code{defcustom} keyword} |
| 308 | Specify @var{setfunction} as the way to change the value of this | 313 | Specify @var{setfunction} as the way to change the value of this |
| 309 | option when using the Customize user interface. The function | 314 | option when using the Customize interface. The function |
| 310 | @var{setfunction} should take two arguments, a symbol (the option | 315 | @var{setfunction} should take two arguments, a symbol (the option |
| 311 | name) and the new value, and should do whatever is necessary to update | 316 | name) and the new value, and should do whatever is necessary to update |
| 312 | the value properly for this option (which may not mean simply setting | 317 | the value properly for this option (which may not mean simply setting |
| @@ -1250,3 +1255,132 @@ the inferior widgets will convert @emph{their} inferior widgets. If | |||
| 1250 | the data structure is itself recursive, this conversion is an infinite | 1255 | the data structure is itself recursive, this conversion is an infinite |
| 1251 | recursion. The @code{lazy} widget prevents the recursion: it convert | 1256 | recursion. The @code{lazy} widget prevents the recursion: it convert |
| 1252 | its @code{:type} argument only when needed. | 1257 | its @code{:type} argument only when needed. |
| 1258 | |||
| 1259 | @node Applying Customizations | ||
| 1260 | @section Applying Customizations | ||
| 1261 | |||
| 1262 | The following functions are responsible for installing the user's | ||
| 1263 | customization settings for variables and faces, respectively. When | ||
| 1264 | the user invokes @samp{Save for future sessions} in the Customize | ||
| 1265 | interface, that takes effect by writing a @code{custom-set-variables} | ||
| 1266 | and/or a @code{custom-set-faces} form into the custom file, to be | ||
| 1267 | evaluated the next time Emacs starts up. | ||
| 1268 | |||
| 1269 | @defun custom-set-variables &rest args | ||
| 1270 | This function installs the variable customizations specified by | ||
| 1271 | @var{args}. Each argument in @var{args} should have the form | ||
| 1272 | |||
| 1273 | @example | ||
| 1274 | (@var{var} @var{expression} [@var{now} [@var{request} [@var{comment}]]]) | ||
| 1275 | @end example | ||
| 1276 | |||
| 1277 | @noindent | ||
| 1278 | @var{var} is a variable name (a symbol), and @var{expression} is an | ||
| 1279 | expression which evaluates to the desired customized value. | ||
| 1280 | |||
| 1281 | If the @code{defcustom} form for @var{var} has been evaluated prior to | ||
| 1282 | this @code{custom-set-variables} call, @var{expression} is immediately | ||
| 1283 | evaluated, and the variable's value is set to the result. Otherwise, | ||
| 1284 | @var{expression} is stored into the variable's @code{saved-value} | ||
| 1285 | property, to be evaluated when the relevant @code{defcustom} is called | ||
| 1286 | (usually when the library defining that variable is loaded into | ||
| 1287 | Emacs). | ||
| 1288 | |||
| 1289 | The @var{now}, @var{request}, and @var{comment} entries are for | ||
| 1290 | internal use only, and may be omitted. @var{now}, if non-@code{nil}, | ||
| 1291 | means to set the variable's value now, even if the variable's | ||
| 1292 | @code{defcustom} form has not been evaluated. @var{request} is a list | ||
| 1293 | of features to be loaded immediately (@pxref{Named Features}). | ||
| 1294 | @var{comment} is a string describing the customization. | ||
| 1295 | @end defun | ||
| 1296 | |||
| 1297 | @defun custom-set-faces &rest args | ||
| 1298 | This function installs the face customizations specified by | ||
| 1299 | @var{args}. Each argument in @var{args} should have the form | ||
| 1300 | |||
| 1301 | @example | ||
| 1302 | (@var{face} @var{spec} [@var{now} [@var{comment}]]) | ||
| 1303 | @end example | ||
| 1304 | |||
| 1305 | @noindent | ||
| 1306 | @var{face} is a face name (a symbol), and @var{spec} is the customized | ||
| 1307 | face specification for that face (@pxref{Defining Faces}). | ||
| 1308 | |||
| 1309 | The @var{now} and @var{comment} entries are for internal use only, and | ||
| 1310 | may be omitted. @var{now}, if non-@code{nil}, means to install the | ||
| 1311 | face specification now, even if the @code{defface} form has not been | ||
| 1312 | evaluated. @var{comment} is a string describing the customization. | ||
| 1313 | @end defun | ||
| 1314 | |||
| 1315 | @node Custom Themes | ||
| 1316 | @section Custom Themes | ||
| 1317 | |||
| 1318 | @dfn{Custom themes} are collections of settings that can be enabled | ||
| 1319 | or disabled as a unit. @xref{Custom Themes,,, emacs, The GNU Emacs | ||
| 1320 | Manual}. Each Custom theme is defined by an Emacs Lisp source file, | ||
| 1321 | which should follow the conventions described in this section. | ||
| 1322 | (Instead of writing a Custom theme by hand, you can also create one | ||
| 1323 | using a Customize-like interface; @pxref{Creating Custom Themes,,, | ||
| 1324 | emacs, The GNU Emacs Manual}.) | ||
| 1325 | |||
| 1326 | A Custom theme file should be named @file{@var{foo}-theme.el}, where | ||
| 1327 | @var{foo} is the theme name. The first Lisp form in the file should | ||
| 1328 | be a call to @code{deftheme}, and the last form should be a call to | ||
| 1329 | @code{provide-theme}. | ||
| 1330 | |||
| 1331 | @defmac deftheme theme &optional doc | ||
| 1332 | This macro declares @var{theme} (a symbol) as the name of a Custom | ||
| 1333 | theme. The optional argument @var{doc} specifies a string describing | ||
| 1334 | the theme; this is the description shown when the user invokes the | ||
| 1335 | @kbd{?} (@code{describe-theme}) command in the @samp{*Custom Themes*} | ||
| 1336 | buffer. | ||
| 1337 | |||
| 1338 | Two special theme names are disallowed: @code{user} is a ``dummy | ||
| 1339 | theme'' used to store the user's direct customization settings, and | ||
| 1340 | @code{changed} is a ``dummy theme'' used to store changes made outside | ||
| 1341 | of the Customize system. If you specify either of these as the | ||
| 1342 | @var{theme} argument, @code{deftheme} signals an error. | ||
| 1343 | @end defmac | ||
| 1344 | |||
| 1345 | @defmac provide-theme theme | ||
| 1346 | This macro declares that the theme named @var{theme} has been fully | ||
| 1347 | specified. | ||
| 1348 | @end defmac | ||
| 1349 | |||
| 1350 | In between @code{deftheme} and @code{provide-theme} are the Lisp | ||
| 1351 | forms specifying the theme settings---usually a call to | ||
| 1352 | @code{custom-theme-set-variables} and/or a call to | ||
| 1353 | @code{custom-theme-set-faces}: | ||
| 1354 | |||
| 1355 | @defun custom-theme-set-variables theme &rest args | ||
| 1356 | This function declares that the Custom theme @var{theme} (a symbol) | ||
| 1357 | customizes the variables in @var{args}. Each argument in @var{args} | ||
| 1358 | should be a list of the form | ||
| 1359 | |||
| 1360 | @example | ||
| 1361 | (@var{var} @var{expression} [@var{now} [@var{request} [@var{comment}]]]) | ||
| 1362 | @end example | ||
| 1363 | |||
| 1364 | @noindent | ||
| 1365 | where the list entries have the same meanings as in | ||
| 1366 | @code{custom-set-variables}. @xref{Applying Customizations}. | ||
| 1367 | @end defun | ||
| 1368 | |||
| 1369 | @defun custom-theme-set-faces theme &rest args | ||
| 1370 | This function declares that the Custom theme @var{theme} (a symbol) | ||
| 1371 | customizes the faces in @var{args}. Each argument in @var{args} | ||
| 1372 | should be a list of the form | ||
| 1373 | |||
| 1374 | @example | ||
| 1375 | (@var{face} @var{spec} [@var{now} [@var{comment}]]) | ||
| 1376 | @end example | ||
| 1377 | |||
| 1378 | @noindent | ||
| 1379 | where the list entries have the same meanings as in | ||
| 1380 | @code{custom-set-faces}. @xref{Applying Customizations}. | ||
| 1381 | @end defun | ||
| 1382 | |||
| 1383 | In principle, a theme file can also contain other Lisp forms, which | ||
| 1384 | would be evaluated when loading the theme; but it is ``bad form'' for | ||
| 1385 | a theme to do this. (For reasons of security, Emacs prompts the user | ||
| 1386 | before loading any non-built-in theme.) | ||
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index ee3ffd8d10c..cc48133113f 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -1885,7 +1885,7 @@ in all frames. But you can also assign a face name a special set of | |||
| 1885 | attributes in one frame (@pxref{Attribute Functions}). | 1885 | attributes in one frame (@pxref{Attribute Functions}). |
| 1886 | 1886 | ||
| 1887 | @menu | 1887 | @menu |
| 1888 | * Defining Faces:: How to define a face with @code{defface}. | 1888 | * Defining Faces:: How to define a face. |
| 1889 | * Face Attributes:: What is in a face? | 1889 | * Face Attributes:: What is in a face? |
| 1890 | * Attribute Functions:: Functions to examine and set face attributes. | 1890 | * Attribute Functions:: Functions to examine and set face attributes. |
| 1891 | * Displaying Faces:: How Emacs combines the faces specified for a character. | 1891 | * Displaying Faces:: How Emacs combines the faces specified for a character. |
| @@ -1904,22 +1904,17 @@ attributes in one frame (@pxref{Attribute Functions}). | |||
| 1904 | @node Defining Faces | 1904 | @node Defining Faces |
| 1905 | @subsection Defining Faces | 1905 | @subsection Defining Faces |
| 1906 | 1906 | ||
| 1907 | The way to define a new face is with @code{defface}. This creates a | 1907 | The @code{defface} macro defines a face and specifies its default |
| 1908 | kind of customization item which the user can customize using the | 1908 | appearance. The user can subsequently customize the face using the |
| 1909 | Customization buffer (@pxref{Customization}). | 1909 | Customize interface (@pxref{Customization}). |
| 1910 | |||
| 1911 | People are sometimes tempted to create variables whose values specify | ||
| 1912 | which faces to use (for example, Font-Lock does this). In the vast | ||
| 1913 | majority of cases, this is not necessary, and simply using faces | ||
| 1914 | directly is preferable. | ||
| 1915 | 1910 | ||
| 1916 | @defmac defface face spec doc [keyword value]@dots{} | 1911 | @defmac defface face spec doc [keyword value]@dots{} |
| 1917 | This declares @var{face} as a customizable face whose default | 1912 | This macro declares @var{face} as a customizable face whose default |
| 1918 | attributes are given by @var{spec}. You should not quote the symbol | 1913 | attributes are given by @var{spec}. You should not quote the symbol |
| 1919 | @var{face}, and it should not end in @samp{-face} (that would be | 1914 | @var{face}, and it should not end in @samp{-face} (that would be |
| 1920 | redundant). The argument @var{doc} specifies the face documentation. | 1915 | redundant). The argument @var{doc} is a documentation string for the |
| 1921 | The keywords you can use in @code{defface} are the same as in | 1916 | face. The additional @var{keyword} arguments have the same meanings |
| 1922 | @code{defgroup} and @code{defcustom} (@pxref{Common Keywords}). | 1917 | as in @code{defgroup} and @code{defcustom} (@pxref{Common Keywords}). |
| 1923 | 1918 | ||
| 1924 | When @code{defface} executes, it defines the face according to | 1919 | When @code{defface} executes, it defines the face according to |
| 1925 | @var{spec}, then uses any customizations that were read from the | 1920 | @var{spec}, then uses any customizations that were read from the |
| @@ -1930,12 +1925,14 @@ Lisp mode (@code{eval-defun}), a special feature of @code{eval-defun} | |||
| 1930 | overrides any customizations of the face. This way, the face reflects | 1925 | overrides any customizations of the face. This way, the face reflects |
| 1931 | exactly what the @code{defface} says. | 1926 | exactly what the @code{defface} says. |
| 1932 | 1927 | ||
| 1933 | The purpose of @var{spec} is to specify how the face should appear on | 1928 | @cindex face specification |
| 1934 | different kinds of terminals. It should be an alist whose elements | 1929 | The @var{spec} argument is a @dfn{face specification}, which states |
| 1935 | have the form @code{(@var{display} @var{atts})}. @var{display} | 1930 | how the face should appear on different kinds of terminals. It should |
| 1936 | specifies a class of terminals (see below), while @var{atts} is a | 1931 | be an alist whose elements each have the form @code{(@var{display} |
| 1937 | property list of face attributes and their values, specifying the | 1932 | @var{atts})}. @var{display} specifies a class of terminals (see |
| 1938 | appearance of the face on matching terminals | 1933 | below), while @var{atts} is a property list of face attributes and |
| 1934 | their values, specifying the appearance of the face on matching | ||
| 1935 | terminals | ||
| 1939 | @iftex | 1936 | @iftex |
| 1940 | (see the next section for details about face attributes). | 1937 | (see the next section for details about face attributes). |
| 1941 | @end iftex | 1938 | @end iftex |
| @@ -2022,14 +2019,22 @@ frame must match one of the @var{value}s specified for it in | |||
| 2022 | :group 'basic-faces) | 2019 | :group 'basic-faces) |
| 2023 | @end example | 2020 | @end example |
| 2024 | 2021 | ||
| 2025 | Internally, @code{defface} uses the symbol property | 2022 | Internally, Emacs stores the face's default specification in its |
| 2026 | @code{face-defface-spec} to record the specified face attributes. The | 2023 | @code{face-defface-spec} symbol property (@pxref{Property Lists}). |
| 2027 | attributes saved by the user with the customization buffer are | 2024 | The @code{saved-face} property stores the face specification saved by |
| 2028 | recorded in the symbol property @code{saved-face}; the attributes | 2025 | the user, using the customization buffer; the @code{customized-face} |
| 2029 | customized by the user for the current session, but not saved, are | 2026 | property stores the face specification customized for the current |
| 2030 | recorded in the symbol property @code{customized-face}. The | 2027 | session, but not saved; and the @code{theme-face} property stores an |
| 2031 | documentation string is recorded in the symbol property | 2028 | alist associating the active customization settings and Custom themes |
| 2032 | @code{face-documentation}. | 2029 | with their specifications for that face. The face's documentation |
| 2030 | string is stored in the @code{face-documentation} property. But | ||
| 2031 | normally you should not try to set any of these properties directly. | ||
| 2032 | @xref{Applying Customizations}, for the @code{custom-set-faces} | ||
| 2033 | function, which is used to apply customized face settings. | ||
| 2034 | |||
| 2035 | People are sometimes tempted to create variables whose values | ||
| 2036 | specify a face to use. In the vast majority of cases, this is not | ||
| 2037 | necessary; it is preferable to simply use faces directly. | ||
| 2033 | 2038 | ||
| 2034 | @defopt frame-background-mode | 2039 | @defopt frame-background-mode |
| 2035 | This option, if non-@code{nil}, specifies the background type to use for | 2040 | This option, if non-@code{nil}, specifies the background type to use for |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index dc835347235..76397556b01 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -123,7 +123,7 @@ Cover art by Etienne Suvasa. | |||
| 123 | * Functions:: A function is a Lisp program | 123 | * Functions:: A function is a Lisp program |
| 124 | that can be invoked from other functions. | 124 | that can be invoked from other functions. |
| 125 | * Macros:: Macros are a way to extend the Lisp language. | 125 | * Macros:: Macros are a way to extend the Lisp language. |
| 126 | * Customization:: Writing customization declarations. | 126 | * Customization:: Making variables and faces customizable. |
| 127 | 127 | ||
| 128 | * Loading:: Reading files of Lisp code into Lisp. | 128 | * Loading:: Reading files of Lisp code into Lisp. |
| 129 | * Byte Compilation:: Compilation makes programs run faster. | 129 | * Byte Compilation:: Compilation makes programs run faster. |
| @@ -500,6 +500,8 @@ Writing Customization Definitions | |||
| 500 | * Group Definitions:: Writing customization group definitions. | 500 | * Group Definitions:: Writing customization group definitions. |
| 501 | * Variable Definitions:: Declaring user options. | 501 | * Variable Definitions:: Declaring user options. |
| 502 | * Customization Types:: Specifying the type of a user option. | 502 | * Customization Types:: Specifying the type of a user option. |
| 503 | * Applying Customizations:: Functions to apply customization settings. | ||
| 504 | * Custom Themes:: Writing Custom themes. | ||
| 503 | 505 | ||
| 504 | Customization Types | 506 | Customization Types |
| 505 | 507 | ||
| @@ -1295,7 +1297,7 @@ Overlays | |||
| 1295 | 1297 | ||
| 1296 | Faces | 1298 | Faces |
| 1297 | 1299 | ||
| 1298 | * Defining Faces:: How to define a face with @code{defface}. | 1300 | * Defining Faces:: How to define a face. |
| 1299 | * Face Attributes:: What is in a face? | 1301 | * Face Attributes:: What is in a face? |
| 1300 | * Attribute Functions:: Functions to examine and set face attributes. | 1302 | * Attribute Functions:: Functions to examine and set face attributes. |
| 1301 | * Displaying Faces:: How Emacs combines the faces specified for | 1303 | * Displaying Faces:: How Emacs combines the faces specified for |
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 12abc2fcd2b..83fbd02b16c 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -1571,8 +1571,8 @@ rather than buffer-local. It defaults to @code{nil}. | |||
| 1571 | 1571 | ||
| 1572 | One of the effects of making a minor mode global is that the | 1572 | One of the effects of making a minor mode global is that the |
| 1573 | @var{mode} variable becomes a customization variable. Toggling it | 1573 | @var{mode} variable becomes a customization variable. Toggling it |
| 1574 | through the Custom interface turns the mode on and off, and its value | 1574 | through the Customize interface turns the mode on and off, and its |
| 1575 | can be saved for future Emacs sessions (@pxref{Saving | 1575 | value can be saved for future Emacs sessions (@pxref{Saving |
| 1576 | Customizations,,, emacs, The GNU Emacs Manual}. For the saved | 1576 | Customizations,,, emacs, The GNU Emacs Manual}. For the saved |
| 1577 | variable to work, you should ensure that the @code{define-minor-mode} | 1577 | variable to work, you should ensure that the @code{define-minor-mode} |
| 1578 | form is evaluated each time Emacs starts; for packages that are not | 1578 | form is evaluated each time Emacs starts; for packages that are not |
| @@ -1691,7 +1691,7 @@ Fundamental mode; but it does not detect the creation of a new buffer | |||
| 1691 | in Fundamental mode. | 1691 | in Fundamental mode. |
| 1692 | 1692 | ||
| 1693 | This defines the customization option @var{global-mode} (@pxref{Customization}), | 1693 | This defines the customization option @var{global-mode} (@pxref{Customization}), |
| 1694 | which can be toggled in the Custom interface to turn the minor mode on | 1694 | which can be toggled in the Customize interface to turn the minor mode on |
| 1695 | and off. As with @code{define-minor-mode}, you should ensure that the | 1695 | and off. As with @code{define-minor-mode}, you should ensure that the |
| 1696 | @code{define-globalized-minor-mode} form is evaluated each time Emacs | 1696 | @code{define-globalized-minor-mode} form is evaluated each time Emacs |
| 1697 | starts, for example by providing a @code{:require} keyword. | 1697 | starts, for example by providing a @code{:require} keyword. |
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 7c49c9e04a0..35ac7c20384 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -290,9 +290,9 @@ form to your init file: | |||
| 290 | 290 | ||
| 291 | Emacs explicitly checks for an expression as shown above in your init | 291 | Emacs explicitly checks for an expression as shown above in your init |
| 292 | file; your login name must appear in the expression as a Lisp string | 292 | file; your login name must appear in the expression as a Lisp string |
| 293 | constant. You can also use the Custom interface. Other methods of setting | 293 | constant. You can also use the Customize interface. Other methods of |
| 294 | @code{inhibit-startup-echo-area-message} to the same value do not | 294 | setting @code{inhibit-startup-echo-area-message} to the same value do |
| 295 | inhibit the startup message. This way, you can easily inhibit the | 295 | not inhibit the startup message. This way, you can easily inhibit the |
| 296 | message for yourself if you wish, but thoughtless copying of your init | 296 | message for yourself if you wish, but thoughtless copying of your init |
| 297 | file will not inhibit the message for someone else. | 297 | file will not inhibit the message for someone else. |
| 298 | @end defopt | 298 | @end defopt |
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index df269868e09..45a0dee3b1c 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi | |||
| @@ -141,7 +141,7 @@ Reference Manual, corresponding to GNU Emacs version @value{EMACSVER}. | |||
| 141 | * Functions:: A function is a Lisp program | 141 | * Functions:: A function is a Lisp program |
| 142 | that can be invoked from other functions. | 142 | that can be invoked from other functions. |
| 143 | * Macros:: Macros are a way to extend the Lisp language. | 143 | * Macros:: Macros are a way to extend the Lisp language. |
| 144 | * Customization:: Writing customization declarations. | 144 | * Customization:: Making variables and faces customizable. |
| 145 | 145 | ||
| 146 | * Loading:: Reading files of Lisp code into Lisp. | 146 | * Loading:: Reading files of Lisp code into Lisp. |
| 147 | * Byte Compilation:: Compilation makes programs run faster. | 147 | * Byte Compilation:: Compilation makes programs run faster. |
| @@ -520,6 +520,8 @@ Writing Customization Definitions | |||
| 520 | * Group Definitions:: Writing customization group definitions. | 520 | * Group Definitions:: Writing customization group definitions. |
| 521 | * Variable Definitions:: Declaring user options. | 521 | * Variable Definitions:: Declaring user options. |
| 522 | * Customization Types:: Specifying the type of a user option. | 522 | * Customization Types:: Specifying the type of a user option. |
| 523 | * Applying Customizations:: Functions to apply customization settings. | ||
| 524 | * Custom Themes:: Writing Custom themes. | ||
| 523 | 525 | ||
| 524 | Customization Types | 526 | Customization Types |
| 525 | 527 | ||
| @@ -1317,7 +1319,7 @@ Overlays | |||
| 1317 | 1319 | ||
| 1318 | Faces | 1320 | Faces |
| 1319 | 1321 | ||
| 1320 | * Defining Faces:: How to define a face with @code{defface}. | 1322 | * Defining Faces:: How to define a face. |
| 1321 | * Face Attributes:: What is in a face? | 1323 | * Face Attributes:: What is in a face? |
| 1322 | * Attribute Functions:: Functions to examine and set face attributes. | 1324 | * Attribute Functions:: Functions to examine and set face attributes. |
| 1323 | * Displaying Faces:: How Emacs combines the faces specified for | 1325 | * Displaying Faces:: How Emacs combines the faces specified for |
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 2a2578158bf..01a3e3c129e 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi | |||
| @@ -140,7 +140,7 @@ Reference Manual, corresponding to GNU Emacs version @value{EMACSVER}. | |||
| 140 | * Functions:: A function is a Lisp program | 140 | * Functions:: A function is a Lisp program |
| 141 | that can be invoked from other functions. | 141 | that can be invoked from other functions. |
| 142 | * Macros:: Macros are a way to extend the Lisp language. | 142 | * Macros:: Macros are a way to extend the Lisp language. |
| 143 | * Customization:: Writing customization declarations. | 143 | * Customization:: Making variables and faces customizable. |
| 144 | 144 | ||
| 145 | * Loading:: Reading files of Lisp code into Lisp. | 145 | * Loading:: Reading files of Lisp code into Lisp. |
| 146 | * Byte Compilation:: Compilation makes programs run faster. | 146 | * Byte Compilation:: Compilation makes programs run faster. |
| @@ -519,6 +519,8 @@ Writing Customization Definitions | |||
| 519 | * Group Definitions:: Writing customization group definitions. | 519 | * Group Definitions:: Writing customization group definitions. |
| 520 | * Variable Definitions:: Declaring user options. | 520 | * Variable Definitions:: Declaring user options. |
| 521 | * Customization Types:: Specifying the type of a user option. | 521 | * Customization Types:: Specifying the type of a user option. |
| 522 | * Applying Customizations:: Functions to apply customization settings. | ||
| 523 | * Custom Themes:: Writing Custom themes. | ||
| 522 | 524 | ||
| 523 | Customization Types | 525 | Customization Types |
| 524 | 526 | ||
| @@ -1316,7 +1318,7 @@ Overlays | |||
| 1316 | 1318 | ||
| 1317 | Faces | 1319 | Faces |
| 1318 | 1320 | ||
| 1319 | * Defining Faces:: How to define a face with @code{defface}. | 1321 | * Defining Faces:: How to define a face. |
| 1320 | * Face Attributes:: What is in a face? | 1322 | * Face Attributes:: What is in a face? |
| 1321 | * Attribute Functions:: Functions to examine and set face attributes. | 1323 | * Attribute Functions:: Functions to examine and set face attributes. |
| 1322 | * Displaying Faces:: How Emacs combines the faces specified for | 1324 | * Displaying Faces:: How Emacs combines the faces specified for |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 10dd1d5448f..f7469ddb015 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-04-12 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * custom.el (custom-theme-set-variables): Doc fix. | ||
| 4 | |||
| 1 | 2012-04-12 Glenn Morris <rgm@gnu.org> | 5 | 2012-04-12 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * international/mule.el (set-auto-coding-for-load): Doc fix. | 7 | * international/mule.el (set-auto-coding-for-load): Doc fix. |
diff --git a/lisp/custom.el b/lisp/custom.el index bffd30bff21..71dcfb424e5 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -934,16 +934,21 @@ Each of the arguments in ARGS should be a list of this form: | |||
| 934 | 934 | ||
| 935 | (SYMBOL EXP [NOW [REQUEST [COMMENT]]]) | 935 | (SYMBOL EXP [NOW [REQUEST [COMMENT]]]) |
| 936 | 936 | ||
| 937 | This stores EXP (without evaluating it) as the saved value for SYMBOL. | 937 | SYMBOL is the variable name, and EXP is an expression which |
| 938 | If NOW is present and non-nil, then also evaluate EXP and set | 938 | evaluates to the customized value. EXP will also be stored, |
| 939 | the default value for the SYMBOL to the value of EXP. | 939 | without evaluating it, in SYMBOL's `saved-value' property, so |
| 940 | that it can be restored via the Customize interface. It is also | ||
| 941 | added to the alist in SYMBOL's `theme-value' property \(by | ||
| 942 | calling `custom-push-theme'). | ||
| 940 | 943 | ||
| 941 | REQUEST is a list of features we must require in order to | 944 | NOW, if present and non-nil, means to install the variable's |
| 942 | handle SYMBOL properly. | 945 | value directly now, even if its `defcustom' declaration has not |
| 943 | COMMENT is a comment string about SYMBOL. | 946 | been executed. This is for internal use only. |
| 947 | |||
| 948 | REQUEST is a list of features to `require' (which are loaded | ||
| 949 | prior to evaluating EXP). | ||
| 944 | 950 | ||
| 945 | EXP itself is saved unevaluated as SYMBOL property `saved-value' and | 951 | COMMENT is a comment string about SYMBOL." |
| 946 | in SYMBOL's list property `theme-value' \(using `custom-push-theme')." | ||
| 947 | (custom-check-theme theme) | 952 | (custom-check-theme theme) |
| 948 | 953 | ||
| 949 | ;; Process all the needed autoloads before anything else, so that the | 954 | ;; Process all the needed autoloads before anything else, so that the |