aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2005-12-09 00:30:08 +0000
committerLuc Teirlinck2005-12-09 00:30:08 +0000
commit365cd965ca6f231a4d2bb41bf47b6ea1758d2117 (patch)
tree9a03b34182e31b3d7a63c669199cc9d08166be94
parente84be785a4a93a6e7f3928c349e2ff292923818b (diff)
downloademacs-365cd965ca6f231a4d2bb41bf47b6ea1758d2117.tar.gz
emacs-365cd965ca6f231a4d2bb41bf47b6ea1758d2117.zip
(Customization): Use xref to elisp manual for non-TeX output.
(Minor Modes): Update. (Customization Groups, Changing a Variable, Face Customization): Update for new appearance of Custom buffers. (Changing a Variable): `custom-buffer-done-function' has been replaced by `custom-buffer-done-kill'. (Specific Customization): In the `customize-group' buffer, a subgroup's contents are not "hidden". They are not included at all. They have no [Show] button. (Mouse Buttons): Add pxref to description of mouse event lists in Elisp manual. Add `menu-bar' and `header-line' dummy prefix keys. (Find Init): Emacs now looks for ~/.emacs.d/init.el instead of ~/.emacs.d/.emacs, if it can not find ~/.emacs(.el).
-rw-r--r--man/custom.texi142
1 files changed, 79 insertions, 63 deletions
diff --git a/man/custom.texi b/man/custom.texi
index 9a76f0cc111..5c7632e9b36 100644
--- a/man/custom.texi
+++ b/man/custom.texi
@@ -7,8 +7,15 @@
7@cindex customization 7@cindex customization
8 8
9 This chapter talks about various topics relevant to adapting the 9 This chapter talks about various topics relevant to adapting the
10behavior of Emacs in minor ways. See @cite{The Emacs Lisp Reference 10behavior of Emacs in minor ways.
11Manual} for how to make more far-reaching changes. @xref{X Resources}, 11@iftex
12See @cite{The Emacs Lisp Reference Manual}
13@end iftex
14@ifnottex
15@xref{Top, Emacs Lisp, Emacs Lisp, elisp, The Emacs Lisp
16Reference Manual},
17@end ifnottex
18for how to make more far-reaching changes. @xref{X Resources},
12for information on using X resources to customize Emacs. 19for information on using X resources to customize Emacs.
13 20
14 Customization that you do within Emacs normally affects only the 21 Customization that you do within Emacs normally affects only the
@@ -52,8 +59,8 @@ line when they are on; for example, @samp{Fill} in the mode line means
52that Auto Fill mode is on. 59that Auto Fill mode is on.
53 60
54 Append @code{-mode} to the name of a minor mode to get the name of a 61 Append @code{-mode} to the name of a minor mode to get the name of a
55command function that turns the mode on or off. Thus, the command to 62command that turns the mode on or off. Thus, the command to
56enable or disable Auto Fill mode is called @kbd{M-x auto-fill-mode}. These 63enable or disable Auto Fill mode is called @code{auto-fill-mode}. These
57commands are usually invoked with @kbd{M-x}, but you can bind keys to them 64commands are usually invoked with @kbd{M-x}, but you can bind keys to them
58if you wish. With no argument, the function turns the mode on if it was 65if you wish. With no argument, the function turns the mode on if it was
59off and off if it was on. This is known as @dfn{toggling}. A positive 66off and off if it was on. This is known as @dfn{toggling}. A positive
@@ -66,21 +73,25 @@ buffer-local; they apply only to the current buffer, so you can enable
66the mode in certain buffers and not others. 73the mode in certain buffers and not others.
67 74
68 For most minor modes, the command name is also the name of a 75 For most minor modes, the command name is also the name of a
69variable which directly controls the mode. The mode is enabled 76variable. The variable's value is non-@code{nil} if the mode is
70whenever this variable's value is non-@code{nil}, and the minor-mode 77enabled and @code{nil} if it is disabled. Some minor-mode commands
71command works by setting the variable. For example, the command 78work by just setting the variable. For example, the command
72@code{outline-minor-mode} works by setting the value of 79@code{abbrev-mode} works by setting the value of @code{abbrev-mode} as
73@code{outline-minor-mode} as a variable; it is this variable that 80a variable; it is this variable that directly turns Abbrev mode on and
74directly turns Outline minor mode on and off. To check whether a 81off. You can directly set the variable's value instead of calling the
75given minor mode works this way, use @kbd{C-h v} to ask for 82mode function. For other minor modes, you need to either set the
76documentation on the variable name. 83variable through the Customize interface or call the mode function to
77 84correctly enable or disable the mode. To check which of these two
78 These minor-mode variables provide a good way for Lisp programs to 85possibilities applies to a given minor mode, use @kbd{C-h v} to ask
79turn minor modes on and off; they are also useful in a file's local 86for documentation on the variable name.
80variables list (@pxref{File Variables}). But please think twice 87
81before setting minor modes with a local variables list, because most 88 For minor mode commands that work by just setting the minor mode
82minor modes are a matter of user preference---other users editing the 89variable, that variable provides a good way for Lisp programs to turn
83same file might not want the same minor modes you prefer. 90minor modes on and off; it is also useful in a file's local variables
91list (@pxref{File Variables}). But please think twice before setting
92minor modes with a local variables list, because most minor modes are
93a matter of user preference---other users editing the same file might
94not want the same minor modes you prefer.
84 95
85 The most useful buffer-local minor modes include Abbrev mode, Auto 96 The most useful buffer-local minor modes include Abbrev mode, Auto
86Fill mode, Auto Save mode, Font-Lock mode, Glasses mode, ISO Accents 97Fill mode, Auto Save mode, Font-Lock mode, Glasses mode, ISO Accents
@@ -144,9 +155,10 @@ In Binary Overwrite mode, digits after @kbd{C-q} specify an
144octal character code, as usual. 155octal character code, as usual.
145 156
146 Here are some useful minor modes that normally apply to all buffers 157 Here are some useful minor modes that normally apply to all buffers
147at once. Since each is enabled or disabled by the value of a 158at once. Since Line Number mode and Transient Mark mode can be
159enabled or disabled just by setting the value of the minor mode
148variable, you @emph{can} set them differently for particular buffers, 160variable, you @emph{can} set them differently for particular buffers,
149by explicitly making the corresponding variables local in those 161by explicitly making the corresponding variable local in those
150buffers. @xref{Locals}. 162buffers. @xref{Locals}.
151 163
152 Icomplete mode displays an indication of available completions when 164 Icomplete mode displays an indication of available completions when
@@ -166,7 +178,7 @@ these modes are enabled by default when you use the X Window System.
166will get an error. This means you must either set the mark, or 178will get an error. This means you must either set the mark, or
167explicitly ``reactivate'' it, before each command that uses the region. 179explicitly ``reactivate'' it, before each command that uses the region.
168The advantage of Transient Mark mode is that Emacs can display the 180The advantage of Transient Mark mode is that Emacs can display the
169region highlighted (currently only when using X). @xref{Mark}. 181region highlighted. @xref{Mark}.
170 182
171@node Easy Customization 183@node Easy Customization
172@section Easy Customization Interface 184@section Easy Customization Interface
@@ -274,7 +286,7 @@ variables and faces), and their structure.
274@samp{[-]}; invoking that hides the group contents. 286@samp{[-]}; invoking that hides the group contents.
275 287
276 Each group, variable, or face name in this buffer has an active field 288 Each group, variable, or face name in this buffer has an active field
277which says @samp{[Group]}, @samp{[Variable]} or @samp{[Face]}. Invoking 289which says @samp{[Group]}, @samp{[Option]} or @samp{[Face]}. Invoking
278that active field creates an ordinary customization buffer showing just 290that active field creates an ordinary customization buffer showing just
279that group and its contents, just that variable, or just that face. 291that group and its contents, just that variable, or just that face.
280This is the way to set values in it. 292This is the way to set values in it.
@@ -286,16 +298,16 @@ This is the way to set values in it.
286customization buffer: 298customization buffer:
287 299
288@smallexample 300@smallexample
289Kill Ring Max: [Hide] 60 301Kill Ring Max: [Hide Value] 60
290 [State]: this variable is unchanged from its standard setting. 302 [State]: STANDARD.
291Maximum length of kill ring before oldest elements are thrown away. 303Maximum length of kill ring before oldest elements are thrown away.
292@end smallexample 304@end smallexample
293 305
294 The text following @samp{[Hide]}, @samp{60} in this case, indicates 306 The text following @samp{[Hide Value]}, @samp{60} in this case, indicates
295the current value of the variable. If you see @samp{[Show]} instead of 307the current value of the variable. If you see @samp{[Show Value]} instead of
296@samp{[Hide]}, it means that the value is hidden; the customization 308@samp{[Hide Value]}, it means that the value is hidden; the customization
297buffer initially hides values that take up several lines. Invoke 309buffer initially hides values that take up several lines. Invoke
298@samp{[Show]} to show the value. 310@samp{[Show Value]} to show the value.
299 311
300 The line after the option name indicates the @dfn{customization state} 312 The line after the option name indicates the @dfn{customization state}
301of the variable: in the example above, it says you have not changed the 313of the variable: in the example above, it says you have not changed the
@@ -317,7 +329,8 @@ another number.
317change to say that you have edited the value: 329change to say that you have edited the value:
318 330
319@smallexample 331@smallexample
320[State]: you have edited the value as text, but not set the variable. 332[State]: EDITED, shown value does not take effect until you set or @r{@dots{}}
333 save it.
321@end smallexample 334@end smallexample
322 335
323@cindex setting option value 336@cindex setting option value
@@ -328,7 +341,7 @@ that, you must @dfn{set} it. To do this, invoke the word
328 The state of the variable changes visibly when you set it: 341 The state of the variable changes visibly when you set it:
329 342
330@smallexample 343@smallexample
331[State]: you have set this variable, but not saved it for future sessions. 344[State]: SET for current session only.
332@end smallexample 345@end smallexample
333 346
334 You don't have to worry about specifying a value that is not valid; 347 You don't have to worry about specifying a value that is not valid;
@@ -355,7 +368,7 @@ value of @code{file-coding-system-alist} is an association list. Here
355is how it appears in the customization buffer: 368is how it appears in the customization buffer:
356 369
357@smallexample 370@smallexample
358File Coding System Alist: [Hide] 371File Coding System Alist: [Hide Value]
359[INS] [DEL] File regexp: \.elc\' 372[INS] [DEL] File regexp: \.elc\'
360 Choice: [Value Menu] Encoding/decoding pair: 373 Choice: [Value Menu] Encoding/decoding pair:
361 Decoding: emacs-mule 374 Decoding: emacs-mule
@@ -373,8 +386,9 @@ File Coding System Alist: [Hide]
373 Decoding: undecided 386 Decoding: undecided
374 Encoding: nil 387 Encoding: nil
375[INS] 388[INS]
376 [State]: this variable is unchanged from its standard setting. 389 [State]: STANDARD.
377Alist to decide a coding system to use for a file I/O operation. [Hide] 390Alist to decide a coding system to use for a file I/O @r{@dots{}}
391 operation. [Hide Rest]
378The format is ((PATTERN . VAL) ...), 392The format is ((PATTERN . VAL) ...),
379where PATTERN is a regular expression matching a file name, 393where PATTERN is a regular expression matching a file name,
380@r{[@dots{}more lines of documentation@dots{}]} 394@r{[@dots{}more lines of documentation@dots{}]}
@@ -420,10 +434,10 @@ Customizations}).
420 434
421 You can also restore the variable to its standard value by invoking 435 You can also restore the variable to its standard value by invoking
422@samp{[State]} and selecting the @samp{Erase Customization} operation. 436@samp{[State]} and selecting the @samp{Erase Customization} operation.
423There are actually three reset operations: 437There are actually four reset operations:
424 438
425@table @samp 439@table @samp
426@item Reset 440@item Reset to Current
427If you have made some modifications and not yet set the variable, 441If you have made some modifications and not yet set the variable,
428this restores the text in the customization buffer to match 442this restores the text in the customization buffer to match
429the actual value. 443the actual value.
@@ -452,28 +466,25 @@ comment you enter will be saved, and displayed again if you again view
452the same variable in a customization buffer, even in another session. 466the same variable in a customization buffer, even in another session.
453 467
454 The state of a group indicates whether anything in that group has been 468 The state of a group indicates whether anything in that group has been
455edited, set or saved. You can select @samp{Set for Current Session}, 469edited, set or saved.
456@samp{Save for Future Sessions} and the various kinds of @samp{Reset}
457operation for the group; these operations on the group apply to all
458options in the group and its subgroups.
459 470
460 Near the top of the customization buffer there are two lines 471 Near the top of the customization buffer there are two lines
461containing several active fields: 472containing several active fields:
462 473
463@smallexample 474@smallexample
464 [Set for Current Session] [Save for Future Sessions] 475 [Set for Current Session] [Save for Future Sessions]
465 [Reset] [Reset to Saved] [Erase Customization] [Finish] 476 [Reset to Current] [Reset to Saved] [Erase Customization] [Finish]
466@end smallexample 477@end smallexample
467 478
468@vindex custom-buffer-done-function 479@vindex custom-buffer-done-function
469@noindent 480@noindent
470Invoking @samp{[Finish]} either buries or kills this customization 481Invoking @samp{[Finish]} either buries or kills this customization
471buffer according to the setting of the option 482buffer according to the setting of the option
472@code{custom-buffer-done-function}; the default is to bury the buffer. 483@code{custom-buffer-done-kill}; the default is to bury the buffer.
473Each of the other fields performs an operation---set, save or 484Each of the other fields performs an operation---set, save or
474reset---on each of the options in the buffer that could meaningfully 485reset---on each of the options in the buffer that could meaningfully
475be set, saved or reset. They do not operate on options whose values 486be set, saved or reset. They do not operate on options whose values
476are hidden. 487are hidden, nor on subgroups.
477 488
478@node Saving Customizations 489@node Saving Customizations
479@subsection Saving Customizations 490@subsection Saving Customizations
@@ -529,10 +540,10 @@ the faces in the group appear in the customization buffer. Here is an
529example of how a face looks: 540example of how a face looks:
530 541
531@smallexample 542@smallexample
532Custom Changed Face:(sample) [Hide] 543Custom Changed Face:(sample) [Hide Face]
533 [State]: this face is unchanged from its standard setting. 544 [State]: STANDARD.
534Face used when the customize item has been changed. 545Face used when the customize item has been changed.
535Parent groups: => Custom Magic Faces 546Parent groups: [Custom Magic Faces]
536Attributes: [ ] Font Family: * 547Attributes: [ ] Font Family: *
537 [ ] Width: * 548 [ ] Width: *
538 [ ] Height: * 549 [ ] Height: *
@@ -556,7 +567,7 @@ attribute by invoking that field. When the attribute is enabled, you
556can change the attribute value in the usual ways. 567can change the attribute value in the usual ways.
557 568
558 For the colors, you can specify a color name (use @kbd{M-x 569 For the colors, you can specify a color name (use @kbd{M-x
559list-colors-display}) for a list of them) or a hexadecimal color 570list-colors-display} for a list of them) or a hexadecimal color
560specification of the form @samp{#@var{rr}@var{gg}@var{bb}}. 571specification of the form @samp{#@var{rr}@var{gg}@var{bb}}.
561(@samp{#000000} is black, @samp{#ff0000} is red, @samp{#00ff00} is 572(@samp{#000000} is black, @samp{#ff0000} is red, @samp{#00ff00} is
562green, @samp{#0000ff} is blue, and @samp{#ffffff} is white.) On a 573green, @samp{#0000ff} is blue, and @samp{#ffffff} is white.) On a
@@ -627,16 +638,15 @@ on the character after point.
627 You can also set up the customization buffer with a specific group, 638 You can also set up the customization buffer with a specific group,
628using @kbd{M-x customize-group}. The immediate contents of the chosen 639using @kbd{M-x customize-group}. The immediate contents of the chosen
629group, including user options, faces, and other groups, all appear 640group, including user options, faces, and other groups, all appear
630as well. However, these subgroups' own contents start out hidden. You 641as well. However, these subgroups' own contents are not included.
631can show their contents in the usual way, by invoking @samp{[Show]}.
632 642
633@findex customize-apropos 643@findex customize-apropos
634 To control more precisely what to customize, you can use @kbd{M-x 644 To control more precisely what to customize, you can use @kbd{M-x
635customize-apropos}. You specify a regular expression as argument; then 645customize-apropos}. You specify a regular expression as argument; then
636all options, faces and groups whose names match this regular expression 646all options, faces and groups whose names match this regular expression
637are set up in the customization buffer. If you specify an empty regular 647are set up in the customization buffer. If you specify an empty regular
638expression, this includes @emph{all} groups, options and faces in the 648expression, this includes @emph{all} groups, options and faces (but
639customization buffer (but that takes a long time). 649that takes a long time).
640 650
641@findex customize-changed-options 651@findex customize-changed-options
642 When you upgrade to a new Emacs version, you might want to customize 652 When you upgrade to a new Emacs version, you might want to customize
@@ -1688,9 +1698,9 @@ word:
1688@cindex keypad 1698@cindex keypad
1689 Many keyboards have a ``numeric keypad'' on the right hand side. 1699 Many keyboards have a ``numeric keypad'' on the right hand side.
1690The numeric keys in the keypad double up as cursor motion keys, 1700The numeric keys in the keypad double up as cursor motion keys,
1691toggled by a key labelled @samp{Num Lock}. By default, Emacs 1701toggled by a key labeled @samp{Num Lock}. By default, Emacs
1692translates these keys to the corresponding keys in the main keyboard. 1702translates these keys to the corresponding keys in the main keyboard.
1693For example, when @samp{Num Lock} is on, the key labelled @samp{8} on 1703For example, when @samp{Num Lock} is on, the key labeled @samp{8} on
1694the numeric keypad produces @code{kp-8}, which is translated to 1704the numeric keypad produces @code{kp-8}, which is translated to
1695@kbd{8}; when @samp{Num Lock} is off, the same key produces 1705@kbd{8}; when @samp{Num Lock} is off, the same key produces
1696@code{kp-up}, which is translated to @key{UP}. If you rebind a key 1706@code{kp-up}, which is translated to @key{UP}. If you rebind a key
@@ -1825,12 +1835,13 @@ twice.
1825 Emacs also supports triple-click events whose names start with 1835 Emacs also supports triple-click events whose names start with
1826@samp{triple-}. Emacs does not distinguish quadruple clicks as event 1836@samp{triple-}. Emacs does not distinguish quadruple clicks as event
1827types; clicks beyond the third generate additional triple-click events. 1837types; clicks beyond the third generate additional triple-click events.
1828However, the full number of clicks is recorded in the event list, so you 1838However, the full number of clicks is recorded in the event list, so
1829can distinguish if you really want to. We don't recommend distinct 1839if you know Emacs Lisp you can distinguish if you really want to
1830meanings for more than three clicks, but sometimes it is useful for 1840(@pxref{Accessing Events,,, elisp, The Emacs Lisp Reference Manual}).
1831subsequent clicks to cycle through the same set of three meanings, so 1841We don't recommend distinct meanings for more than three clicks, but
1832that four clicks are equivalent to one click, five are equivalent to 1842sometimes it is useful for subsequent clicks to cycle through the same
1833two, and six are equivalent to three. 1843set of three meanings, so that four clicks are equivalent to one
1844click, five are equivalent to two, and six are equivalent to three.
1834 1845
1835 Emacs also records multiple presses in drag and button-down events. 1846 Emacs also records multiple presses in drag and button-down events.
1836For example, when you press a button twice, then move the mouse while 1847For example, when you press a button twice, then move the mouse while
@@ -1848,7 +1859,7 @@ click. Its value is in units of milliseconds. If the value is
1848 1859
1849@vindex double-click-fuzz 1860@vindex double-click-fuzz
1850 The variable @code{double-click-fuzz} specifies how much the mouse 1861 The variable @code{double-click-fuzz} specifies how much the mouse
1851can move between clicks still allow them to be grouped as a multiple 1862can move between clicks and still allow them to be grouped as a multiple
1852click. Its value is in units of pixels on windowed displays and in 1863click. Its value is in units of pixels on windowed displays and in
1853units of 1/8 of a character cell on text-mode terminals; the default is 1864units of 1/8 of a character cell on text-mode terminals; the default is
18543. 18653.
@@ -1882,6 +1893,10 @@ you use scroll bars, they appear in place of these vertical lines.)
1882@item vertical-scroll-bar 1893@item vertical-scroll-bar
1883The mouse was in a vertical scroll bar. (This is the only kind of 1894The mouse was in a vertical scroll bar. (This is the only kind of
1884scroll bar Emacs currently supports.) 1895scroll bar Emacs currently supports.)
1896@item menu-bar
1897The mouse was in the menu bar.
1898@item header-line
1899The mouse was in a header line.
1885@ignore 1900@ignore
1886@item horizontal-scroll-bar 1901@item horizontal-scroll-bar
1887The mouse was in a horizontal scroll bar. Horizontal scroll bars do 1902The mouse was in a horizontal scroll bar. Horizontal scroll bars do
@@ -2397,9 +2412,10 @@ library. @xref{Hooks}.
2397@subsection How Emacs Finds Your Init File 2412@subsection How Emacs Finds Your Init File
2398 2413
2399 Normally Emacs uses the environment variable @env{HOME} to find 2414 Normally Emacs uses the environment variable @env{HOME} to find
2400@file{.emacs}; that's what @samp{~} means in a file name. If @file{.emacs} 2415@file{.emacs}; that's what @samp{~} means in a file name. If
2401is not found directly inside @file{~/}, Emacs looks for it in 2416@file{.emacs} is not found inside @file{~/} (nor @file{.emacs.el}),
2402@file{~/.emacs.d/}. 2417Emacs looks for @file{~/.emacs.d/init.el} (which, like
2418@file{~/.emacs.el}, can be byte-compiled).
2403 2419
2404 However, if you run Emacs from a shell started by @code{su}, Emacs 2420 However, if you run Emacs from a shell started by @code{su}, Emacs
2405tries to find your own @file{.emacs}, not that of the user you are 2421tries to find your own @file{.emacs}, not that of the user you are