diff options
| author | Richard M. Stallman | 2005-02-06 11:16:21 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-02-06 11:16:21 +0000 |
| commit | af1b4255018e1776e9ef4a30b1c9f5c353c8d097 (patch) | |
| tree | 18adca9a245d3cbc038c228f85b2463d5d876407 | |
| parent | e93b7ca6aa44231ddb36c513809598db6fe66dd4 (diff) | |
| download | emacs-af1b4255018e1776e9ef4a30b1c9f5c353c8d097.tar.gz emacs-af1b4255018e1776e9ef4a30b1c9f5c353c8d097.zip | |
(Minor Modes): Fix typo.
(Easy Customization): Fix menu style.
(Variables): Add xref.
(Examining): Setting for future sessions works through .emacs.
(Keymaps): "Text terminals", not "Many".
(Init Rebinding): Explain \C-. Show example of \M-.
Fix minor wording errors.
(Function Keys): Explain vector syntax just once.
(Named ASCII Chars): Clarify history of TAB/C-i connection.
(Init File): Mention .emacs.d directory.
(Init Examples): Add xref.
(Find Init): Mention .emacs.d directory.
| -rw-r--r-- | man/custom.texi | 92 |
1 files changed, 51 insertions, 41 deletions
diff --git a/man/custom.texi b/man/custom.texi index 2b9710ea512..2cfb61988dd 100644 --- a/man/custom.texi +++ b/man/custom.texi | |||
| @@ -83,7 +83,7 @@ documentation on the variable name. | |||
| 83 | These minor-mode variables provide a good way for Lisp programs to turn | 83 | These minor-mode variables provide a good way for Lisp programs to turn |
| 84 | minor modes on and off; they are also useful in a file's local variables | 84 | minor modes on and off; they are also useful in a file's local variables |
| 85 | list. But please think twice before setting minor modes with a local | 85 | list. But please think twice before setting minor modes with a local |
| 86 | variables list, because most minor modes are matter of user | 86 | variables list, because most minor modes are a matter of user |
| 87 | preference---other users editing the same file might not want the same | 87 | preference---other users editing the same file might not want the same |
| 88 | minor modes you prefer. | 88 | minor modes you prefer. |
| 89 | 89 | ||
| @@ -198,8 +198,7 @@ different under a window system, since faces are then used to indicate | |||
| 198 | the active fields and other features. | 198 | the active fields and other features. |
| 199 | 199 | ||
| 200 | @menu | 200 | @menu |
| 201 | * Groups: Customization Groups. | 201 | * Groups: Customization Groups. How options are classified in a structure. |
| 202 | How options are classified in a structure. | ||
| 203 | * Changing a Variable:: How to edit a value and set an option. | 202 | * Changing a Variable:: How to edit a value and set an option. |
| 204 | * Saving Customizations:: Details of saving customizations. | 203 | * Saving Customizations:: Details of saving customizations. |
| 205 | * Face Customization:: How to edit the attributes of a face. | 204 | * Face Customization:: How to edit the attributes of a face. |
| @@ -687,8 +686,9 @@ change. Each user option that you can set with the customization | |||
| 687 | buffer is (if it is not a face) in fact a Lisp variable. Emacs does | 686 | buffer is (if it is not a face) in fact a Lisp variable. Emacs does |
| 688 | not (usually) change the values of these variables; instead, you set | 687 | not (usually) change the values of these variables; instead, you set |
| 689 | the values, and thereby alter and control the behavior of certain | 688 | the values, and thereby alter and control the behavior of certain |
| 690 | Emacs commands. Use of the customization buffer is explained above; | 689 | Emacs commands. Use of the customization buffer is explained above |
| 691 | here we describe other aspects of Emacs variables. | 690 | (@pxref{Easy Customization}); here we describe other aspects of Emacs |
| 691 | variables. | ||
| 692 | 692 | ||
| 693 | @menu | 693 | @menu |
| 694 | * Examining:: Examining or setting one variable's value. | 694 | * Examining:: Examining or setting one variable's value. |
| @@ -761,7 +761,9 @@ buffer, type in the expression, and then type @kbd{C-j}. @xref{Lisp | |||
| 761 | Interaction}. | 761 | Interaction}. |
| 762 | 762 | ||
| 763 | Setting variables, like all means of customizing Emacs except where | 763 | Setting variables, like all means of customizing Emacs except where |
| 764 | otherwise stated, affects only the current Emacs session. | 764 | otherwise stated, affects only the current Emacs session. The only |
| 765 | way to alter the variable in future sessions is to put something in | ||
| 766 | the @file{~/.emacs} file to set it those sessions (@pxref{Init File}). | ||
| 765 | 767 | ||
| 766 | @node Hooks | 768 | @node Hooks |
| 767 | @subsection Hooks | 769 | @subsection Hooks |
| @@ -1179,7 +1181,7 @@ historical, and we might change it someday. | |||
| 1179 | Function keys send input events just as character keys do, and keymaps | 1181 | Function keys send input events just as character keys do, and keymaps |
| 1180 | can have bindings for them. | 1182 | can have bindings for them. |
| 1181 | 1183 | ||
| 1182 | On many terminals, typing a function key actually sends the computer a | 1184 | On text terminals, typing a function key actually sends the computer a |
| 1183 | sequence of characters; the precise details of the sequence depends on | 1185 | sequence of characters; the precise details of the sequence depends on |
| 1184 | which function key and on the model of terminal you are using. (Often | 1186 | which function key and on the model of terminal you are using. (Often |
| 1185 | the sequence starts with @kbd{@key{ESC} [}.) If Emacs understands your | 1187 | the sequence starts with @kbd{@key{ESC} [}.) If Emacs understands your |
| @@ -1464,16 +1466,17 @@ to bind @kbd{C-z} to @code{shell}: | |||
| 1464 | @end example | 1466 | @end example |
| 1465 | 1467 | ||
| 1466 | @noindent | 1468 | @noindent |
| 1467 | This example uses a string constant containing one character, @kbd{C-z}. | 1469 | This example uses a string constant containing one character, |
| 1468 | The single-quote before the command name, @code{shell}, marks it as a | 1470 | @kbd{C-z}. (@samp{\C-} is string syntax for a control character.) The |
| 1471 | single-quote before the command name, @code{shell}, marks it as a | ||
| 1469 | constant symbol rather than a variable. If you omit the quote, Emacs | 1472 | constant symbol rather than a variable. If you omit the quote, Emacs |
| 1470 | would try to evaluate @code{shell} immediately as a variable. This | 1473 | would try to evaluate @code{shell} immediately as a variable. This |
| 1471 | probably causes an error; it certainly isn't what you want. | 1474 | probably causes an error; it certainly isn't what you want. |
| 1472 | 1475 | ||
| 1473 | Here is another example that binds a key sequence two characters long: | 1476 | Here is another example that binds the key sequence @kbd{C-x M-l}: |
| 1474 | 1477 | ||
| 1475 | @example | 1478 | @example |
| 1476 | (global-set-key "\C-xl" 'make-symbolic-link) | 1479 | (global-set-key "\C-x\M-l" 'make-symbolic-link) |
| 1477 | @end example | 1480 | @end example |
| 1478 | 1481 | ||
| 1479 | To put @key{TAB}, @key{RET}, @key{ESC}, or @key{DEL} in the | 1482 | To put @key{TAB}, @key{RET}, @key{ESC}, or @key{DEL} in the |
| @@ -1521,8 +1524,7 @@ keyboard-modified mouse button): | |||
| 1521 | @end example | 1524 | @end example |
| 1522 | 1525 | ||
| 1523 | You can use a vector for the simple cases too. Here's how to | 1526 | You can use a vector for the simple cases too. Here's how to |
| 1524 | rewrite the first three examples above, using vectors to bind | 1527 | rewrite the first six examples above to use vectors: |
| 1525 | @kbd{C-z}, @kbd{C-x l}, and @kbd{C-x @key{TAB}}: | ||
| 1526 | 1528 | ||
| 1527 | @example | 1529 | @example |
| 1528 | (global-set-key [?\C-z] 'shell) | 1530 | (global-set-key [?\C-z] 'shell) |
| @@ -1535,7 +1537,7 @@ rewrite the first three examples above, using vectors to bind | |||
| 1535 | 1537 | ||
| 1536 | @noindent | 1538 | @noindent |
| 1537 | As you see, you represent a multi-character key sequence with a vector | 1539 | As you see, you represent a multi-character key sequence with a vector |
| 1538 | by listing each of the characters within the square brackets that | 1540 | by listing all of the characters in order within the square brackets that |
| 1539 | delimit the vector. | 1541 | delimit the vector. |
| 1540 | 1542 | ||
| 1541 | Language and coding systems can cause problems with key bindings | 1543 | Language and coding systems can cause problems with key bindings |
| @@ -1584,10 +1586,9 @@ given function key on your terminal, type @kbd{C-h c} followed by that | |||
| 1584 | key. | 1586 | key. |
| 1585 | 1587 | ||
| 1586 | A key sequence which contains function key symbols (or anything but | 1588 | A key sequence which contains function key symbols (or anything but |
| 1587 | @acronym{ASCII} characters) must be a vector rather than a string. The vector | 1589 | @acronym{ASCII} characters) must be a vector rather than a string. |
| 1588 | syntax uses spaces between the elements, and square brackets around the | 1590 | Thus, to bind function key @samp{f1} to the command @code{rmail}, |
| 1589 | whole vector. Thus, to bind function key @samp{f1} to the command | 1591 | write the following: |
| 1590 | @code{rmail}, write the following: | ||
| 1591 | 1592 | ||
| 1592 | @example | 1593 | @example |
| 1593 | (global-set-key [f1] 'rmail) | 1594 | (global-set-key [f1] 'rmail) |
| @@ -1635,18 +1636,21 @@ word: | |||
| 1635 | @subsection Named @acronym{ASCII} Control Characters | 1636 | @subsection Named @acronym{ASCII} Control Characters |
| 1636 | 1637 | ||
| 1637 | @key{TAB}, @key{RET}, @key{BS}, @key{LFD}, @key{ESC} and @key{DEL} | 1638 | @key{TAB}, @key{RET}, @key{BS}, @key{LFD}, @key{ESC} and @key{DEL} |
| 1638 | started out as names for certain @acronym{ASCII} control characters, used so often | 1639 | started out as names for certain @acronym{ASCII} control characters, |
| 1639 | that they have special keys of their own. Later, users found it | 1640 | used so often that they have special keys of their own. For instance, |
| 1641 | @key{TAB} was another name for @kbd{C-i}. Later, users found it | ||
| 1640 | convenient to distinguish in Emacs between these keys and the ``same'' | 1642 | convenient to distinguish in Emacs between these keys and the ``same'' |
| 1641 | control characters typed with the @key{CTRL} key. | 1643 | control characters typed with the @key{CTRL} key. Therefore, on most |
| 1642 | 1644 | modern terminals, they are no longer the same, and @key{TAB} is | |
| 1643 | Emacs distinguishes these two kinds of input, when the keyboard | 1645 | distinguishable from @kbd{C-i}. |
| 1644 | reports these keys to Emacs. It treats the ``special'' keys as function | 1646 | |
| 1645 | keys named @code{tab}, @code{return}, @code{backspace}, @code{linefeed}, | 1647 | Emacs can distinguish these two kinds of input if the keyboard does. |
| 1646 | @code{escape}, and @code{delete}. These function keys translate | 1648 | It treats the ``special'' keys as function keys named @code{tab}, |
| 1647 | automatically into the corresponding @acronym{ASCII} characters @emph{if} they | 1649 | @code{return}, @code{backspace}, @code{linefeed}, @code{escape}, and |
| 1648 | have no bindings of their own. As a result, neither users nor Lisp | 1650 | @code{delete}. These function keys translate automatically into the |
| 1649 | programs need to pay attention to the distinction unless they care to. | 1651 | corresponding @acronym{ASCII} characters @emph{if} they have no |
| 1652 | bindings of their own. As a result, neither users nor Lisp programs | ||
| 1653 | need to pay attention to the distinction unless they care to. | ||
| 1650 | 1654 | ||
| 1651 | If you do not want to distinguish between (for example) @key{TAB} and | 1655 | If you do not want to distinguish between (for example) @key{TAB} and |
| 1652 | @kbd{C-i}, make just one binding, for the @acronym{ASCII} character @key{TAB} | 1656 | @kbd{C-i}, make just one binding, for the @acronym{ASCII} character @key{TAB} |
| @@ -1950,12 +1954,14 @@ Reference Manual}. | |||
| 1950 | @cindex rebinding keys, permanently | 1954 | @cindex rebinding keys, permanently |
| 1951 | @cindex startup (init file) | 1955 | @cindex startup (init file) |
| 1952 | 1956 | ||
| 1953 | When Emacs is started, it normally loads a Lisp program from the file | 1957 | When Emacs is started, it normally loads a Lisp program from the |
| 1954 | @file{.emacs} or @file{.emacs.el} in your home directory. We call this | 1958 | file @file{.emacs} or @file{.emacs.el} in your home directory. (You |
| 1955 | file your @dfn{init file} because it specifies how to initialize Emacs | 1959 | can also put it in a subdirectory @file{~/.emacs.d} and Emacs will |
| 1956 | for you. You can use the command line switch @samp{-q} to prevent | 1960 | still find it.) We call this file your @dfn{init file} because it |
| 1957 | loading your init file, and @samp{-u} (or @samp{--user}) to specify a | 1961 | specifies how to initialize Emacs for you. You can use the command |
| 1958 | different user's init file (@pxref{Initial Options}). | 1962 | line switch @samp{-q} to prevent loading your init file, and @samp{-u} |
| 1963 | (or @samp{--user}) to specify a different user's init file | ||
| 1964 | (@pxref{Initial Options}). | ||
| 1959 | 1965 | ||
| 1960 | @cindex @file{default.el}, the default init file | 1966 | @cindex @file{default.el}, the default init file |
| 1961 | There can also be a @dfn{default init file}, which is the library | 1967 | There can also be a @dfn{default init file}, which is the library |
| @@ -2223,7 +2229,8 @@ If the function is not interactive, omit the @code{t} or use | |||
| 2223 | @code{nil}. | 2229 | @code{nil}. |
| 2224 | 2230 | ||
| 2225 | @item | 2231 | @item |
| 2226 | Rebind the key @kbd{C-x l} to run the function @code{make-symbolic-link}. | 2232 | Rebind the key @kbd{C-x l} to run the function @code{make-symbolic-link} |
| 2233 | (@xref{Init Rebinding}). | ||
| 2227 | 2234 | ||
| 2228 | @example | 2235 | @example |
| 2229 | (global-set-key "\C-xl" 'make-symbolic-link) | 2236 | (global-set-key "\C-xl" 'make-symbolic-link) |
| @@ -2326,11 +2333,14 @@ library. @xref{Hooks}. | |||
| 2326 | @subsection How Emacs Finds Your Init File | 2333 | @subsection How Emacs Finds Your Init File |
| 2327 | 2334 | ||
| 2328 | Normally Emacs uses the environment variable @env{HOME} to find | 2335 | Normally Emacs uses the environment variable @env{HOME} to find |
| 2329 | @file{.emacs}; that's what @samp{~} means in a file name. But if you | 2336 | @file{.emacs}; that's what @samp{~} means in a file name. If @file{.emacs} |
| 2330 | run Emacs from a shell started by @code{su}, Emacs tries to find your | 2337 | is not found directly inside @file{~/}, Emacs looks for it in |
| 2331 | own @file{.emacs}, not that of the user you are currently pretending | 2338 | @file{~/.emacs.d/}. |
| 2332 | to be. The idea is that you should get your own editor customizations | 2339 | |
| 2333 | even if you are running as the super user. | 2340 | However, if you run Emacs from a shell started by @code{su}, Emacs |
| 2341 | tries to find your own @file{.emacs}, not that of the user you are | ||
| 2342 | currently pretending to be. The idea is that you should get your own | ||
| 2343 | editor customizations even if you are running as the super user. | ||
| 2334 | 2344 | ||
| 2335 | More precisely, Emacs first determines which user's init file to use. | 2345 | More precisely, Emacs first determines which user's init file to use. |
| 2336 | It gets the user name from the environment variables @env{LOGNAME} and | 2346 | It gets the user name from the environment variables @env{LOGNAME} and |