diff options
| author | Richard M. Stallman | 2006-07-03 15:50:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-07-03 15:50:37 +0000 |
| commit | 1abade00b8ebf52f51353da7297537b3f4b34996 (patch) | |
| tree | 7457c3e331bc10e476f8a72b7a4617948647896a | |
| parent | bc5fba524ec067fc2db8372178df353ac647086d (diff) | |
| download | emacs-1abade00b8ebf52f51353da7297537b3f4b34996.tar.gz emacs-1abade00b8ebf52f51353da7297537b3f4b34996.zip | |
Lots of cleanups.
| -rw-r--r-- | man/help.texi | 528 | ||||
| -rw-r--r-- | man/m-x.texi | 66 |
2 files changed, 289 insertions, 305 deletions
diff --git a/man/help.texi b/man/help.texi index 4d69e18cc39..47600b711fa 100644 --- a/man/help.texi +++ b/man/help.texi | |||
| @@ -11,65 +11,62 @@ | |||
| 11 | @kindex C-h | 11 | @kindex C-h |
| 12 | @kindex F1 | 12 | @kindex F1 |
| 13 | 13 | ||
| 14 | Emacs provides extensive help features accessible through a single | 14 | Emacs provides extensive help features, all accessible through the |
| 15 | character, @kbd{C-h} (or @key{F1}). @kbd{C-h} is a prefix key that is | 15 | @dfn{help character}, @kbd{C-h}. This is a prefix key that is used |
| 16 | used for commands that display documentation. The characters that you | 16 | for commands that display documentation; the next character you type |
| 17 | can type after @kbd{C-h} are called @dfn{help options}. One help | 17 | should be a @dfn{help options}, to ask for a particular kind of help. |
| 18 | option is @kbd{C-h}; that is how you ask for help about using | 18 | You can cancel the @kbd{C-h} command with @kbd{C-g}. The function key |
| 19 | @kbd{C-h}. To cancel, type @kbd{C-g}. The function key @key{F1} is | 19 | @key{F1} is equivalent to @kbd{C-h}. |
| 20 | equivalent to @kbd{C-h}. | ||
| 21 | 20 | ||
| 22 | @kindex C-h C-h | 21 | @kindex C-h C-h |
| 23 | @findex help-for-help | 22 | @findex help-for-help |
| 24 | @kbd{C-h C-h} (@code{help-for-help}) displays a list of the possible | 23 | @kbd{C-h} itself is one of the help options; @kbd{C-h C-h} displays |
| 25 | help options, each with a brief description. You can look at the | 24 | a list of help options, with a brief description of each one |
| 26 | list, using @key{SPC} and @key{DEL} to scroll through it, then type | 25 | (@code{help-for-help}). You can scroll the list with @key{SPC} and |
| 27 | the help option you want. To cancel, type @kbd{C-g}. | 26 | @key{DEL}, then type the help option you want. To cancel, type |
| 27 | @kbd{C-g}. | ||
| 28 | 28 | ||
| 29 | @kbd{C-h} or @key{F1} means ``help'' in various other contexts as | 29 | @kbd{C-h} or @key{F1} means ``help'' in various other contexts as |
| 30 | well. After a prefix key, it displays a list of the alternatives that | 30 | well. For instance, you can type them after a prefix key to display |
| 31 | can follow the prefix key. (A few prefix keys don't support | 31 | list of the keys that can follow the prefix key. (A few prefix keys |
| 32 | @kbd{C-h}, because they define other meanings for it, but they all | 32 | don't support @kbd{C-h} in this way, because they define other |
| 33 | support @key{F1}.) | 33 | meanings for it, but they all support @key{F1} for help.) |
| 34 | 34 | ||
| 35 | Most help buffers use a special major mode, Help mode, which lets you | 35 | Most help buffers use a special major mode, Help mode, which lets |
| 36 | scroll conveniently with @key{SPC} and @key{DEL}. It also offers | 36 | you scroll conveniently with @key{SPC} and @key{DEL}. You can also |
| 37 | hyperlinks to URLs and further help regarding cross-referenced names, Info | 37 | follow hyperlinks to URLs, and to other facilities including Info |
| 38 | nodes, customization buffers and the like. @xref{Help Mode}. | 38 | nodes and customization buffers. @xref{Help Mode}. |
| 39 | 39 | ||
| 40 | @cindex searching documentation efficiently | 40 | @cindex searching documentation efficiently |
| 41 | @cindex looking for a subject in documentation | 41 | @cindex looking for a subject in documentation |
| 42 | If you are looking for a certain feature, but don't know where | 42 | If you are looking for a certain feature, but don't know what it is |
| 43 | exactly it is documented, and aren't sure of the name of a | 43 | called or where to look, we recommend three methods. First, try an |
| 44 | related command or variable, we recommend trying these methods. Usually | 44 | apropos command, then try searching the manual index, then look in the |
| 45 | it is best to start with an apropos command, then try searching the | 45 | FAQ and the package keywords. |
| 46 | manual index, then finally look in the FAQ and the package keywords. | ||
| 47 | 46 | ||
| 48 | @table @kbd | 47 | @table @kbd |
| 49 | @item C-h a @var{topics} @key{RET} | 48 | @item C-h a @var{topics} @key{RET} |
| 50 | This searches for commands whose names match @var{topics}, which | 49 | This searches for commands whose names match the argument |
| 51 | should be a keyword, a list of keywords, or a regular expression | 50 | @var{topics}. The argument can be a keyword, a list of keywords, or a |
| 52 | (@pxref{Regexps}). This command displays all the matches in a new | 51 | regular expression (@pxref{Regexps}). This command displays all the |
| 53 | buffer. @xref{Apropos}. | 52 | matches in a new buffer. @xref{Apropos}. |
| 54 | 53 | ||
| 55 | @item C-h i d m emacs @key{RET} i @var{topic} @key{RET} | 54 | @item C-h i d m emacs @key{RET} i @var{topic} @key{RET} |
| 56 | This looks up @var{topic} in the indices of the Emacs on-line manual. | 55 | This searches for @var{topic} in the indices of the on-line Emacs |
| 57 | If there are several matches, Emacs displays the first one. You can then | 56 | manual, and displays the first match found. Press @kbd{,} to see |
| 58 | press @kbd{,} to move to other matches, until you find what you are | 57 | subsequent matches. You can use a regular expression as @var{topic}. |
| 59 | looking for. | ||
| 60 | 58 | ||
| 61 | @item C-h i d m emacs @key{RET} s @var{topic} @key{RET} | 59 | @item C-h i d m emacs @key{RET} s @var{topic} @key{RET} |
| 62 | Similar, but searches for @var{topic} (which can be a regular | 60 | Similar, but searches the @emph{text} of the manual rather than the |
| 63 | expression) in the @emph{text} of the manual rather than in its | ||
| 64 | indices. | 61 | indices. |
| 65 | 62 | ||
| 66 | @item C-h C-f | 63 | @item C-h C-f |
| 67 | This brings up the Emacs FAQ. You can use the Info commands | 64 | This displays the Emacs FAQ. You can use the Info commands |
| 68 | to browse it. | 65 | to browse it. |
| 69 | 66 | ||
| 70 | @item C-h p | 67 | @item C-h p |
| 71 | Finally, you can try looking up a suitable package using keywords | 68 | This displays the available Emacs packages based on keywords. |
| 72 | pertinent to the feature you need. @xref{Library Keywords}. | 69 | @xref{Library Keywords}. |
| 73 | @end table | 70 | @end table |
| 74 | 71 | ||
| 75 | @menu | 72 | @menu |
| @@ -93,25 +90,25 @@ pertinent to the feature you need. @xref{Library Keywords}. | |||
| 93 | @section Help Summary | 90 | @section Help Summary |
| 94 | @end ifnottex | 91 | @end ifnottex |
| 95 | 92 | ||
| 96 | Here is a summary of the Emacs interactive help commands. | 93 | Here is a summary of the Emacs interactive help commands. (The |
| 97 | @xref{Help Files}, for other help commands that just display a | 94 | character that follows @kbd{C-h} is the ``help option.'') @xref{Help |
| 98 | pre-written file of information. The character that follows | 95 | Files}, for other help commands that display fixed files of |
| 99 | @kbd{C-h} is a ``help option.'' | 96 | information. |
| 100 | 97 | ||
| 101 | @table @kbd | 98 | @table @kbd |
| 102 | @item C-h a @var{topics} @key{RET} | 99 | @item C-h a @var{topics} @key{RET} |
| 103 | Display a list of commands whose names match @var{topics} | 100 | Display a list of commands whose names match @var{topics} |
| 104 | (@code{apropos-command}; @pxref{Apropos}). | 101 | (@code{apropos-command}; @pxref{Apropos}). |
| 105 | @item C-h b | 102 | @item C-h b |
| 106 | Display a table of all key bindings in effect now, in this order: minor | 103 | Display all active key bindings; minor mode bindings first, then those |
| 107 | mode bindings, major mode bindings, and global bindings | 104 | of the major mode, then global bindings (@code{describe-bindings}). |
| 108 | (@code{describe-bindings}). | ||
| 109 | @item C-h c @var{key} | 105 | @item C-h c @var{key} |
| 110 | Show the name of the command that @var{key} runs | 106 | Given a key sequence @var{key}, show the name of the command that it |
| 111 | (@code{describe-key-briefly}). Here @kbd{c} stands for ``character.'' | 107 | runs (@code{describe-key-briefly}). Here @kbd{c} stands for |
| 112 | For more extensive information on @var{key}, use @kbd{C-h k}. | 108 | ``character.'' For more extensive information on @var{key}, use |
| 109 | @kbd{C-h k}. | ||
| 113 | @item C-h d @var{topics} @key{RET} | 110 | @item C-h d @var{topics} @key{RET} |
| 114 | Display a list of commands and variables whose documentation matches | 111 | Display the commands and variables whose documentation matches |
| 115 | @var{topics} (@code{apropos-documentation}). | 112 | @var{topics} (@code{apropos-documentation}). |
| 116 | @item C-h e | 113 | @item C-h e |
| 117 | Display the @code{*Messages*} buffer | 114 | Display the @code{*Messages*} buffer |
| @@ -119,12 +116,12 @@ Display the @code{*Messages*} buffer | |||
| 119 | @item C-h f @var{function} @key{RET} | 116 | @item C-h f @var{function} @key{RET} |
| 120 | Display documentation on the Lisp function named @var{function} | 117 | Display documentation on the Lisp function named @var{function} |
| 121 | (@code{describe-function}). Since commands are Lisp functions, | 118 | (@code{describe-function}). Since commands are Lisp functions, |
| 122 | a command name may be used. | 119 | this works for commands too. |
| 123 | @item C-h h | 120 | @item C-h h |
| 124 | Display the @file{HELLO} file, which shows examples of various character | 121 | Display the @file{HELLO} file, which shows examples of various character |
| 125 | sets. | 122 | sets. |
| 126 | @item C-h i | 123 | @item C-h i |
| 127 | Run Info, the program for browsing documentation files (@code{info}). | 124 | Run Info, the GNU documentation browser (@code{info}). |
| 128 | The complete Emacs manual is available on-line in Info. | 125 | The complete Emacs manual is available on-line in Info. |
| 129 | @item C-h k @var{key} | 126 | @item C-h k @var{key} |
| 130 | Display the name and documentation of the command that @var{key} runs | 127 | Display the name and documentation of the command that @var{key} runs |
| @@ -137,7 +134,7 @@ Display documentation of the current major mode (@code{describe-mode}). | |||
| 137 | @item C-h p | 134 | @item C-h p |
| 138 | Find packages by topic keyword (@code{finder-by-keyword}). | 135 | Find packages by topic keyword (@code{finder-by-keyword}). |
| 139 | @item C-h s | 136 | @item C-h s |
| 140 | Display the current contents of the syntax table, plus an explanation of | 137 | Display the current contents of the syntax table, with an explanation of |
| 141 | what they mean (@code{describe-syntax}). @xref{Syntax}. | 138 | what they mean (@code{describe-syntax}). @xref{Syntax}. |
| 142 | @item C-h t | 139 | @item C-h t |
| 143 | Enter the Emacs interactive tutorial (@code{help-with-tutorial}). | 140 | Enter the Emacs interactive tutorial (@code{help-with-tutorial}). |
| @@ -147,28 +144,29 @@ Display the documentation of the Lisp variable @var{var} | |||
| 147 | @item C-h w @var{command} @key{RET} | 144 | @item C-h w @var{command} @key{RET} |
| 148 | Show which keys run the command named @var{command} (@code{where-is}). | 145 | Show which keys run the command named @var{command} (@code{where-is}). |
| 149 | @item C-h C @var{coding} @key{RET} | 146 | @item C-h C @var{coding} @key{RET} |
| 150 | Describe coding system @var{coding} | 147 | Describe the coding system @var{coding} |
| 151 | (@code{describe-coding-system}). | 148 | (@code{describe-coding-system}). |
| 152 | @item C-h C @key{RET} | 149 | @item C-h C @key{RET} |
| 153 | Describe the coding systems currently in use. | 150 | Describe the coding systems currently in use. |
| 154 | @item C-h I @var{method} @key{RET} | 151 | @item C-h I @var{method} @key{RET} |
| 155 | Describe an input method (@code{describe-input-method}). | 152 | Describe the input method @var{method} (@code{describe-input-method}). |
| 156 | @item C-h L @var{language-env} @key{RET} | 153 | @item C-h L @var{language-env} @key{RET} |
| 157 | Display information on the character sets, coding systems, and input | 154 | Display information on the character sets, coding systems, and input |
| 158 | methods used for language environment @var{language-env} | 155 | methods used in language environment @var{language-env} |
| 159 | (@code{describe-language-environment}). | 156 | (@code{describe-language-environment}). |
| 160 | @item C-h F @var{function} @key{RET} | 157 | @item C-h F @var{function} @key{RET} |
| 161 | Enter Info and go to the node documenting the Emacs function @var{function} | 158 | Enter Info and goes to the node that documents the Emacs function |
| 162 | (@code{Info-goto-emacs-command-node}). | 159 | @var{function} (@code{Info-goto-emacs-command-node}). |
| 163 | @item C-h K @var{key} | 160 | @item C-h K @var{key} |
| 164 | Enter Info and go to the node where the key sequence @var{key} is | 161 | Enter Info and goes to the node that documents the key sequence |
| 165 | documented (@code{Info-goto-emacs-key-command-node}). | 162 | @var{key} (@code{Info-goto-emacs-key-command-node}). |
| 166 | @item C-h S @var{symbol} @key{RET} | 163 | @item C-h S @var{symbol} @key{RET} |
| 167 | Display the Info documentation on symbol @var{symbol} according to the | 164 | Display the Info documentation on symbol @var{symbol} according to the |
| 168 | programming language you are editing (@code{info-lookup-symbol}). | 165 | programming language you are editing (@code{info-lookup-symbol}). |
| 169 | @item C-h . | 166 | @item C-h . |
| 170 | Display a help message associated with special text areas, such as | 167 | Display the help message for a special text area, if point is in one |
| 171 | links in @samp{*Help*} buffers (@code{display-local-help}). | 168 | (@code{display-local-help}). (These include, for example, links in |
| 169 | @samp{*Help*} buffers.) | ||
| 172 | @end table | 170 | @end table |
| 173 | 171 | ||
| 174 | @node Key Help | 172 | @node Key Help |
| @@ -176,50 +174,48 @@ links in @samp{*Help*} buffers (@code{display-local-help}). | |||
| 176 | 174 | ||
| 177 | @kindex C-h c | 175 | @kindex C-h c |
| 178 | @findex describe-key-briefly | 176 | @findex describe-key-briefly |
| 179 | The most basic @kbd{C-h} commands are @kbd{C-h c} | 177 | The help commands to get information about a key sequence are |
| 180 | (@code{describe-key-briefly}) and @w{@kbd{C-h k}} (@code{describe-key}). | 178 | @kbd{C-h c} and @w{@kbd{C-h k}}. @kbd{C-h c @var{key}} displays in |
| 181 | @kbd{C-h c @var{key}} displays in the echo area the name of the command | 179 | the echo area the name of the command that @var{key} is bound to. For |
| 182 | that @var{key} is bound to. For example, @kbd{C-h c C-f} displays | 180 | example, @kbd{C-h c C-f} displays @samp{forward-char}. Since command |
| 183 | @samp{forward-char}. Since command names are chosen to describe what | 181 | names are chosen to describe what the commands do, this gives you a |
| 184 | the commands do, this is a good way to get a very brief description of | 182 | very brief description of what @var{key} does. |
| 185 | what @var{key} does. | ||
| 186 | 183 | ||
| 187 | @kindex C-h k | 184 | @kindex C-h k |
| 188 | @findex describe-key | 185 | @findex describe-key |
| 189 | @kbd{C-h k @var{key}} is similar but gives more information: it | 186 | @kbd{C-h k @var{key}} is similar but gives more information: it |
| 190 | displays the documentation string of the command as well as its name. | 187 | displays the documentation string of the command as well as its name. |
| 191 | This is too big for the echo area, so a window is used for the display. | 188 | It displays this information in a window, since it may not fit in the |
| 189 | echo area. | ||
| 192 | 190 | ||
| 193 | @kindex C-h K | 191 | @kindex C-h K |
| 194 | @findex Info-goto-emacs-key-command-node | 192 | @findex Info-goto-emacs-key-command-node |
| 195 | To find the documentation of a key sequence, type @kbd{C-h K} and | 193 | To find the documentation of a key sequence @var{key}, type @kbd{C-h |
| 196 | then enter that key sequence. This looks up the description of the | 194 | K @var{key}}. This displays the appropriate manual section which |
| 197 | command invoked by the key in whichever manual describes it (this need | 195 | contains the documentation of @var{key}. |
| 198 | not be the Emacs manual). @kbd{C-h K} runs the command | ||
| 199 | @code{Info-goto-emacs-key-command-node}. | ||
| 200 | 196 | ||
| 201 | @kbd{C-h c}, @kbd{C-h k} and @kbd{C-h K} work for any sort of key | 197 | @kbd{C-h c}, @kbd{C-h k} and @kbd{C-h K} work for any sort of key |
| 202 | sequences, including function keys, menus, and mouse events. For | 198 | sequences, including function keys, menus, and mouse events. For |
| 203 | instance, you can type @kbd{C-h k} and then select a menu item from | 199 | instance, after @kbd{C-h k} you can select a menu item from the menu |
| 204 | the menu bar, to show the documentation string of the command that | 200 | bar, to view the documentation string of the command it runs. |
| 205 | menu item runs. | ||
| 206 | 201 | ||
| 207 | @kindex C-h w | 202 | @kindex C-h w |
| 208 | @findex where-is | 203 | @findex where-is |
| 209 | @kbd{C-h w @var{command} @key{RET}} tells you what keys are bound to | 204 | @kbd{C-h w @var{command} @key{RET}} lists the keys that are bound to |
| 210 | @var{command}. It displays a list of the keys in the echo area. If it | 205 | @var{command}. It displays the list in the echo area. If it says the |
| 211 | says the command is not on any key, you must use @kbd{M-x} to run it. | 206 | command is not on any key, that means you must use @kbd{M-x} to run |
| 212 | @kbd{C-h w} runs the command @code{where-is}. | 207 | it. @kbd{C-h w} runs the command @code{where-is}. |
| 213 | 208 | ||
| 214 | @node Name Help | 209 | @node Name Help |
| 215 | @section Help by Command or Variable Name | 210 | @section Help by Command or Variable Name |
| 216 | 211 | ||
| 217 | @kindex C-h f | 212 | @kindex C-h f |
| 218 | @findex describe-function | 213 | @findex describe-function |
| 219 | @kbd{C-h f} (@code{describe-function}) reads the name of a Lisp function | 214 | @kbd{C-h f @var{function} @key{RET}} (@code{describe-function}) |
| 220 | using the minibuffer, then displays that function's documentation string | 215 | displays the documentation of Lisp function @var{function}, in a |
| 221 | in a window. Since commands are Lisp functions, you can use this to get | 216 | window. Since commands are Lisp functions, you can use this method to |
| 222 | the documentation of a command that you know by name. For example, | 217 | view the documentation of any command whose name you know. For |
| 218 | example, | ||
| 223 | 219 | ||
| 224 | @example | 220 | @example |
| 225 | C-h f auto-fill-mode @key{RET} | 221 | C-h f auto-fill-mode @key{RET} |
| @@ -230,118 +226,119 @@ displays the documentation of @code{auto-fill-mode}. This is the only | |||
| 230 | way to get the documentation of a command that is not bound to any key | 226 | way to get the documentation of a command that is not bound to any key |
| 231 | (one which you would normally run using @kbd{M-x}). | 227 | (one which you would normally run using @kbd{M-x}). |
| 232 | 228 | ||
| 233 | @kbd{C-h f} is also useful for Lisp functions that you are planning | 229 | @kbd{C-h f} is also useful for Lisp functions that you use in a Lisp |
| 234 | to use in a Lisp program. For example, if you have just written the | 230 | program. For example, if you have just written the expression |
| 235 | expression @code{(make-vector len)} and want to check that you are | 231 | @code{(make-vector len)} and want to check that you are using |
| 236 | using @code{make-vector} properly, type @kbd{C-h f make-vector | 232 | @code{make-vector} properly, type @kbd{C-h f make-vector @key{RET}}. |
| 237 | @key{RET}}. Because @kbd{C-h f} allows all function names, not just | 233 | Because @kbd{C-h f} allows all function names, not just command names, |
| 238 | command names, you may find that some of your favorite completion | 234 | you may find that some of your favorite completion abbreviations that |
| 239 | abbreviations that work in @kbd{M-x} don't work in @kbd{C-h f}. An | 235 | work in @kbd{M-x} don't work in @kbd{C-h f}. An abbreviation that is |
| 240 | abbreviation may be unique among command names, yet fail to be unique | 236 | unique among command names may not be unique among all function names. |
| 241 | when other function names are allowed. | 237 | |
| 242 | 238 | If you type @kbd{C-h f @key{RET}}, it describes the function called | |
| 243 | The default function name for @kbd{C-h f} to describe, if you type | 239 | by the innermost Lisp expression in the buffer around point, |
| 244 | just @key{RET}, is the name of the function called by the innermost Lisp | 240 | @emph{provided} that function name is a valid, defined Lisp function. |
| 245 | expression in the buffer around point, @emph{provided} that is a valid, | 241 | (That name appears as the default while you enter the argument.) For |
| 246 | defined Lisp function name. For example, if point is located following | 242 | example, if point is located following the text @samp{(make-vector |
| 247 | the text @samp{(make-vector (car x)}, the innermost list containing | 243 | (car x)}, the innermost list containing point is the one that starts |
| 248 | point is the one that starts with @samp{(make-vector}, so the default is | 244 | with @samp{(make-vector}, so @kbd{C-h f @key{RET}} will describe the |
| 249 | to describe the function @code{make-vector}. | 245 | function @code{make-vector}. |
| 250 | 246 | ||
| 251 | @kbd{C-h f} is often useful just to verify that you have the right | 247 | @kbd{C-h f} is also useful just to verify that you spelled a |
| 252 | spelling for the function name. If @kbd{C-h f} mentions a name from the | 248 | function name correctly. If the minibuffer prompt for @kbd{C-h f} |
| 253 | buffer as the default, that name must be defined as a Lisp function. If | 249 | shows the function name from the buffer as the default, it means that |
| 254 | that is all you want to know, just type @kbd{C-g} to cancel the @kbd{C-h | 250 | name is defined as a Lisp function. Type @kbd{C-g} to cancel the |
| 255 | f} command, then go on editing. | 251 | @kbd{C-h f} command if you don't really want to view the |
| 256 | 252 | documentation. | |
| 257 | @kbd{C-h v} (@code{describe-variable}) is like @kbd{C-h f} but describes | 253 | |
| 258 | Lisp variables instead of Lisp functions. Its default is the Lisp symbol | 254 | @kbd{C-h v} (@code{describe-variable}) is like @kbd{C-h f} but |
| 259 | around or before point, but only if that is the name of a known Lisp | 255 | describes Lisp variables instead of Lisp functions. Its default is |
| 260 | variable. @xref{Variables}. | 256 | the Lisp symbol around or before point, if that is the name of a |
| 261 | 257 | defined Lisp variable. @xref{Variables}. | |
| 262 | Help buffers describing Emacs variables and functions normally have | 258 | |
| 263 | hyperlinks to the definition, if you have the source files installed. | 259 | Help buffers that describe Emacs variables and functions normally |
| 264 | (@xref{Hyperlinking}.) If you know Lisp (or C), this provides the | 260 | have hyperlinks to the corresponding source definition, if you have |
| 265 | ultimate documentation. If you don't know Lisp, you should learn it. | 261 | the source files installed. (@xref{Hyperlinking}.) If you know Lisp |
| 266 | (The Introduction to Emacs Lisp Programming, available from the FSF | 262 | (or C), this provides the ultimate documentation. If you don't know |
| 267 | through fsf.org, is a good way to get started.) Emacs won't be happy | 263 | Lisp, you should learn it. (The Introduction to Emacs Lisp |
| 268 | if it feels you are just @emph{using} Emacs, treating it as an object | 264 | Programming, available from the FSF through fsf.org, is a good way to |
| 269 | program. If you really love Emacs, show that you care by reading the | 265 | get started.) If Emacs feels you are just @emph{using} it, treating |
| 270 | source code. | 266 | it as an object program, its feelings may be hurt. For real intimacy, |
| 267 | read the Emacs source code. | ||
| 271 | 268 | ||
| 272 | @kindex C-h F | 269 | @kindex C-h F |
| 273 | @findex Info-goto-emacs-command-node | 270 | @findex Info-goto-emacs-command-node |
| 274 | To find a specific function's documentation in a manual, use | 271 | To find a function's documentation in a manual, use @kbd{C-h F} |
| 275 | @kbd{C-h F} (@code{Info-goto-emacs-command-node}). This knows | 272 | (@code{Info-goto-emacs-command-node}). This knows about various |
| 276 | about various manuals, not just the Emacs manual, and finds the | 273 | manuals, not just the Emacs manual, and finds the right one. |
| 277 | right one. | ||
| 278 | 274 | ||
| 279 | @node Apropos | 275 | @node Apropos |
| 280 | @section Apropos | 276 | @section Apropos |
| 281 | 277 | ||
| 282 | A more sophisticated sort of question to ask is, ``What are the | 278 | The @dfn{apropos} commands answer questions like, ``What are the |
| 283 | commands for working with files?'' The @dfn{apropos} commands ask | 279 | commands for working with files?'' More precisely, you specify an |
| 284 | such questions---they look for things whose names match an | ||
| 285 | @dfn{apropos pattern}, which means either a word, a list of words, or | 280 | @dfn{apropos pattern}, which means either a word, a list of words, or |
| 286 | a regular expression. Each apropos command displays a list of | 281 | a regular expression. Each apropos command displays a list of items |
| 287 | matching items in a special buffer. | 282 | that match the pattern, in a separate buffer. |
| 288 | 283 | ||
| 289 | @table @kbd | 284 | @table @kbd |
| 290 | @item C-h a @var{pattern} @key{RET} | 285 | @item C-h a @var{pattern} @key{RET} |
| 291 | Search for commands whose names match @var{pattern}. | 286 | Search for commands whose names match @var{pattern}. |
| 292 | 287 | ||
| 293 | @item M-x apropos @key{RET} @var{pattern} @key{RET} | 288 | @item M-x apropos @key{RET} @var{pattern} @key{RET} |
| 294 | Similar, but it searches for noninteractive functions and for | 289 | Search for functions and variables whose names match @var{pattern}. |
| 295 | variables, as well as commands. | 290 | Both interactive functions (commands) and noninteractive functions can |
| 291 | be found by this command. | ||
| 296 | 292 | ||
| 297 | @item M-x apropos-variable @key{RET} @var{pattern} @key{RET} | 293 | @item M-x apropos-variable @key{RET} @var{pattern} @key{RET} |
| 298 | Similar, but it searches for variables only. | 294 | Search for user-option variables whose names match @var{pattern}. |
| 299 | 295 | ||
| 300 | @item M-x apropos-value @key{RET} @var{pattern} @key{RET} | 296 | @item M-x apropos-value @key{RET} @var{pattern} @key{RET} |
| 301 | Similar, but it searches for variables based on their values, or | 297 | Search for functions whose definitions @var{pattern}, and variables |
| 302 | functions based on their definitions. | 298 | whose values match @var{pattern}. |
| 303 | 299 | ||
| 304 | @item C-h d @var{pattern} @key{RET} | 300 | @item C-h d @var{pattern} @key{RET} |
| 305 | Search the @emph{documentation strings} (the built-in short | 301 | Search for functions and variables whose @strong{documentation |
| 306 | descriptions) of all variables and functions (not their names) for a | 302 | strings} match @var{pattern}. |
| 307 | match for @var{pattern}. | ||
| 308 | @end table | 303 | @end table |
| 309 | 304 | ||
| 310 | @kindex C-h a | 305 | @kindex C-h a |
| 311 | @findex apropos-command | 306 | @findex apropos-command |
| 312 | @cindex apropos | 307 | @cindex apropos |
| 313 | To find the commands that work on files, type @kbd{C-h a file | 308 | The simplest kind of apropos pattern is one word. Anything which |
| 314 | @key{RET}}. This displays a list of all command names that contain | 309 | contains that word matches the pattern. Thus, to find the commands |
| 315 | @samp{file}, including @code{copy-file}, @code{find-file}, and so on. | 310 | that work on files, type @kbd{C-h a file @key{RET}}. This displays a |
| 316 | With each command name appears a brief description of how to use the | 311 | list of all command names that contain @samp{file}, including |
| 317 | command, and what keys you can currently invoke it with. For example, | 312 | @code{copy-file}, @code{find-file}, and so on. Each command name |
| 318 | it would say that you can invoke @code{find-file} by typing @kbd{C-x | 313 | comes with a brief description and a list of keys you can currently |
| 319 | C-f}. The @kbd{a} in @kbd{C-h a} stands for ``Apropos''; @kbd{C-h a} | 314 | invoke it with. In our example, it would say that you can invoke |
| 315 | @code{find-file} by typing @kbd{C-x C-f}. | ||
| 316 | |||
| 317 | The @kbd{a} in @kbd{C-h a} stands for ``Apropos''; @kbd{C-h a} | ||
| 320 | runs the command @code{apropos-command}. This command normally checks | 318 | runs the command @code{apropos-command}. This command normally checks |
| 321 | only commands (interactive functions); if you specify a prefix | 319 | only commands (interactive functions); if you specify a prefix |
| 322 | argument, it checks noninteractive functions as well. | 320 | argument, it checks noninteractive functions as well. |
| 323 | 321 | ||
| 324 | If you want more information about a function definition, variable or | 322 | For more information about a function definition, variable or symbol |
| 325 | symbol property listed in the Apropos buffer, you can click on it with | 323 | property listed in the apropos buffer, you can click on it with |
| 326 | @kbd{Mouse-1} or @kbd{Mouse-2}, or move there and type @key{RET}. | 324 | @kbd{Mouse-1} or @kbd{Mouse-2}, or move there and type @key{RET}. |
| 327 | 325 | ||
| 328 | @kbd{C-h a} with a single word can find too many matches. Don't | 326 | When you specify more than one word in the apropos pattern, a name |
| 329 | just give up; you can give Apropos a list of words to search for. | ||
| 330 | When you specify more than one word in the apropos pattern, a name | ||
| 331 | must contain at least two of the words in order to match. Thus, if | 327 | must contain at least two of the words in order to match. Thus, if |
| 332 | you are looking for commands to kill a chunk of text before point, you | 328 | you are looking for commands to kill a chunk of text before point, you |
| 333 | could try @kbd{C-h a kill back backward behind before @key{RET}}. | 329 | could try @kbd{C-h a kill back backward behind before @key{RET}}. The |
| 330 | real command name @code{kill-backward} will match that; if there were | ||
| 331 | a command @code{kill-text-before}, it would also match, since it | ||
| 332 | contains two of the specified words. | ||
| 334 | 333 | ||
| 335 | For even greater flexibility, you can specify a regular expression | 334 | For even greater flexibility, you can specify a regular expression |
| 336 | (@pxref{Regexps}). An apropos pattern is interpreted as a regular | 335 | (@pxref{Regexps}). An apropos pattern is interpreted as a regular |
| 337 | expression if it contains any of the regular expression special | 336 | expression if it contains any of the regular expression special |
| 338 | characters, @samp{^$*+?.\[}. | 337 | characters, @samp{^$*+?.\[}. |
| 339 | 338 | ||
| 340 | Here is a set of arguments to give to @kbd{C-h a} that covers many | 339 | Following the conventions for naming Emacs commands, here are some |
| 341 | classes of Emacs commands, since there are strong conventions for | 340 | words that you'll find useful in apropos patterns. By using them in |
| 342 | naming the standard Emacs commands. By giving you a feel for the | 341 | @kbd{C-h a}, you will also get a feel for the naming conventions. |
| 343 | naming conventions, this set should also serve to aid you in | ||
| 344 | developing a technique for picking Apropos keywords. | ||
| 345 | 342 | ||
| 346 | @quotation | 343 | @quotation |
| 347 | char, line, word, sentence, paragraph, region, page, sexp, list, defun, | 344 | char, line, word, sentence, paragraph, region, page, sexp, list, defun, |
| @@ -352,45 +349,44 @@ view, describe, default. | |||
| 352 | @end quotation | 349 | @end quotation |
| 353 | 350 | ||
| 354 | @findex apropos | 351 | @findex apropos |
| 355 | To list all Lisp symbols that contain a match for an Apropos pattern, | 352 | Use @kbd{M-x apropos} instead of @kbd{C-h a} to list all the Lisp |
| 356 | not just the ones that are defined as commands, use the command | 353 | symbols that match an apropos pattern, not just the symbols that are |
| 357 | @kbd{M-x apropos} instead of @kbd{C-h a}. This command does not check | 354 | commands. This command does not list key bindings by default; specify |
| 358 | key bindings by default; specify a numeric argument if you want it to | 355 | a numeric argument if you want it to list them. |
| 359 | check them. | ||
| 360 | 356 | ||
| 361 | @findex apropos-variable | 357 | @findex apropos-variable |
| 362 | To list user-customizable variables that match an apropos pattern, | 358 | Use @kbd{M-x apropos-variable} to list user-customizable variables |
| 363 | use the command @kbd{M-x apropos-variable}. If you specify a prefix | 359 | that match an apropos pattern. If you specify a prefix argument, it |
| 364 | argument, it checks all variables. | 360 | lists all matching variables. |
| 365 | 361 | ||
| 366 | @kindex C-h d | 362 | @kindex C-h d |
| 367 | @findex apropos-documentation | 363 | @findex apropos-documentation |
| 368 | The @code{apropos-documentation} command is like @code{apropos} | 364 | The @code{apropos-documentation} command is like @code{apropos} |
| 369 | except that it searches documentation strings instead of symbol names | 365 | except that it searches documentation strings instead of symbol names |
| 370 | for matches for the specified Apropos pattern. | 366 | for matches. |
| 371 | 367 | ||
| 372 | @findex apropos-value | 368 | @findex apropos-value |
| 373 | The @code{apropos-value} command is like @code{apropos} except that | 369 | The @code{apropos-value} command is like @code{apropos} except that |
| 374 | it searches variables' values for matches for the pattern. With a | 370 | it searches variables' values for matches for the apropos pattern. |
| 375 | prefix argument, it also checks symbols' function definitions and | 371 | With a prefix argument, it also checks symbols' function definitions |
| 376 | property lists. | 372 | and property lists. |
| 377 | 373 | ||
| 378 | @vindex apropos-do-all | 374 | @vindex apropos-do-all |
| 379 | If the variable @code{apropos-do-all} is non-@code{nil}, the commands | 375 | If the variable @code{apropos-do-all} is non-@code{nil}, the apropos |
| 380 | above all behave as if they had been given a prefix argument. | 376 | commands always behave as if they had been given a prefix argument. |
| 381 | 377 | ||
| 382 | @vindex apropos-sort-by-scores | 378 | @vindex apropos-sort-by-scores |
| 383 | @cindex apropos search results, order by score | 379 | @cindex apropos search results, order by score |
| 384 | By default, Apropos lists the search results in alphabetical order. | 380 | By default, apropos lists the search results in alphabetical order. |
| 385 | If the variable @code{apropos-sort-by-scores} is non-@code{nil}, | 381 | If the variable @code{apropos-sort-by-scores} is non-@code{nil}, the |
| 386 | Apropos tries to guess the relevance of each result, and displays the | 382 | apropos commands try to guess the relevance of each result, and |
| 387 | most relevant ones first. | 383 | display the most relevant ones first. |
| 388 | 384 | ||
| 389 | @vindex apropos-documentation-sort-by-scores | 385 | @vindex apropos-documentation-sort-by-scores |
| 390 | By default, Apropos lists the search results for | 386 | By default, apropos lists the search results for |
| 391 | @code{apropos-documentation} in order of relevance of the match. If | 387 | @code{apropos-documentation} in order of relevance of the match. If |
| 392 | the variable @code{apropos-documentation-sort-by-scores} is | 388 | the variable @code{apropos-documentation-sort-by-scores} is |
| 393 | @code{nil}, Apropos lists the symbols found in alphabetical order. | 389 | @code{nil}, apropos lists the symbols found in alphabetical order. |
| 394 | 390 | ||
| 395 | @node Library Keywords | 391 | @node Library Keywords |
| 396 | @section Keyword Search for Lisp Libraries | 392 | @section Keyword Search for Lisp Libraries |
| @@ -444,23 +440,23 @@ use: | |||
| 444 | @section Help for International Language Support | 440 | @section Help for International Language Support |
| 445 | 441 | ||
| 446 | You can use the command @kbd{C-h L} | 442 | You can use the command @kbd{C-h L} |
| 447 | (@code{describe-language-environment}) to find out information about | 443 | (@code{describe-language-environment}) to get information about a |
| 448 | the support for a specific language environment. @xref{Language | 444 | specific language environment. @xref{Language Environments}. This |
| 449 | Environments}. This tells you which languages this language | 445 | tells you which languages this language environment supports. It also |
| 450 | environment is useful for, and lists the character sets, coding | 446 | lists the character sets, coding systems, and input methods that work |
| 451 | systems, and input methods that it operates on. It also shows some | 447 | with this language environment, and finally shows some sample text to |
| 452 | sample text to illustrate scripts. | 448 | illustrate scripts. |
| 453 | 449 | ||
| 454 | The command @kbd{C-h h} (@code{view-hello-file}) displays the file | 450 | The command @kbd{C-h h} (@code{view-hello-file}) displays the file |
| 455 | @file{etc/HELLO}, which shows how to say ``hello'' in many languages. | 451 | @file{etc/HELLO}, which shows how to say ``hello'' in many languages. |
| 456 | 452 | ||
| 457 | The command @kbd{C-h I} (@code{describe-input-method}) describes | 453 | The command @kbd{C-h I} (@code{describe-input-method}) describes an |
| 458 | information about input methods---either a specified input method, or by | 454 | input method---either a specified input method, or by default the |
| 459 | default the input method in use. @xref{Input Methods}. | 455 | input method currently in use. @xref{Input Methods}. |
| 460 | 456 | ||
| 461 | The command @kbd{C-h C} (@code{describe-coding-system}) describes | 457 | The command @kbd{C-h C} (@code{describe-coding-system}) describes |
| 462 | information about coding systems---either a specified coding system, or | 458 | coding systems---either a specified coding system, or the ones |
| 463 | the ones currently in use. @xref{Coding Systems}. | 459 | currently in use. @xref{Coding Systems}. |
| 464 | 460 | ||
| 465 | @node Help Mode | 461 | @node Help Mode |
| 466 | @section Help Mode Commands | 462 | @section Help Mode Commands |
| @@ -487,36 +483,36 @@ Show all documentation about the symbol at point. | |||
| 487 | @end table | 483 | @end table |
| 488 | 484 | ||
| 489 | When a function name (@pxref{M-x,, Running Commands by Name}), | 485 | When a function name (@pxref{M-x,, Running Commands by Name}), |
| 490 | variable name (@pxref{Variables}), or face name (@pxref{Faces}) appears | 486 | variable name (@pxref{Variables}), or face name (@pxref{Faces}) |
| 491 | in the documentation, it normally appears inside paired single-quotes. | 487 | appears in the documentation, it normally appears inside paired |
| 492 | You can click on the name with @kbd{Mouse-1} or @kbd{Mouse-2}, or move | 488 | single-quotes. To view the documentation of that command, variable or |
| 493 | point there and type @key{RET}, to view the documentation of that | 489 | face, you can click on the name with @kbd{Mouse-1} or @kbd{Mouse-2}, |
| 494 | command, variable or face. Use @kbd{C-c C-b} to retrace your steps. | 490 | or move point there and type @key{RET}. Use @kbd{C-c C-b} to retrace |
| 491 | your steps. | ||
| 495 | 492 | ||
| 496 | @cindex URL, viewing in help | 493 | @cindex URL, viewing in help |
| 497 | @cindex help, viewing web pages | 494 | @cindex help, viewing web pages |
| 498 | @cindex viewing web pages in help | 495 | @cindex viewing web pages in help |
| 499 | @cindex web pages, viewing in help | 496 | @cindex web pages, viewing in help |
| 500 | @findex browse-url | 497 | @findex browse-url |
| 501 | You can follow cross references to URLs (web pages) as well. When | 498 | You can follow cross references to URLs (web pages) also. This uses |
| 502 | you follow a cross reference that is a URL, the @code{browse-url} | 499 | the @code{browse-url} command to view the page in the browser you |
| 503 | command is used to view the web page in a browser of your choosing. | 500 | choose. @xref{Browse-URL}. |
| 504 | @xref{Browse-URL}. | ||
| 505 | 501 | ||
| 506 | @kindex @key{TAB} @r{(Help mode)} | 502 | @kindex @key{TAB} @r{(Help mode)} |
| 507 | @findex help-next-ref | 503 | @findex help-next-ref |
| 508 | @kindex S-@key{TAB} @r{(Help mode)} | 504 | @kindex S-@key{TAB} @r{(Help mode)} |
| 509 | @findex help-previous-ref | 505 | @findex help-previous-ref |
| 510 | There are convenient commands for moving point to cross references in | 506 | There are convenient commands to move point to cross references in |
| 511 | the help text. @key{TAB} (@code{help-next-ref}) moves point down to the | 507 | the help text. @key{TAB} (@code{help-next-ref}) moves point down to |
| 512 | next cross reference. Use @kbd{S-@key{TAB}} to move point up to the | 508 | the next cross reference. @kbd{S-@key{TAB}} moves up to the previous |
| 513 | previous cross reference (@code{help-previous-ref}). | 509 | cross reference (@code{help-previous-ref}). |
| 514 | 510 | ||
| 515 | You can view all documentation about any symbol name that appears in | 511 | To view all documentation about any symbol name that appears in the |
| 516 | the text, by moving point to the symbol name and typing @kbd{C-c C-c} | 512 | text, move point to the symbol name and type @kbd{C-c C-c} |
| 517 | (@code{help-follow-symbol}). This shows all available documentation | 513 | (@code{help-follow-symbol}). This shows all available documentation |
| 518 | about the symbol as a variable, function and/or face. @kbd{C-c C-b} | 514 | about the symbol as a variable, function and/or face. As above, use |
| 519 | works in this case also, to retrace your steps. | 515 | @kbd{C-c C-b} to retrace your steps. |
| 520 | 516 | ||
| 521 | @node Misc Help | 517 | @node Misc Help |
| 522 | @section Other Help Commands | 518 | @section Other Help Commands |
| @@ -526,22 +522,18 @@ works in this case also, to retrace your steps. | |||
| 526 | @cindex Info | 522 | @cindex Info |
| 527 | @cindex manuals, on-line | 523 | @cindex manuals, on-line |
| 528 | @cindex on-line manuals | 524 | @cindex on-line manuals |
| 529 | @kbd{C-h i} (@code{info}) runs the Info program, which is used for | 525 | @kbd{C-h i} (@code{info}) runs the Info program, which browses |
| 530 | browsing through structured documentation files. The entire Emacs manual | 526 | structured documentation files. The entire Emacs manual is available |
| 531 | is available within Info. Eventually all the documentation of the GNU | 527 | within Info, along with many other manuals for the GNU system. Type |
| 532 | system will be available. Type @kbd{h} after entering Info to run | 528 | @kbd{h} after entering Info to run a tutorial on using Info. |
| 533 | a tutorial on using Info. | ||
| 534 | 529 | ||
| 535 | @cindex find Info manual by its file name | 530 | @cindex find Info manual by its file name |
| 536 | With a numeric argument, @kbd{C-h i} selects an Info buffer with the | 531 | With a numeric argument @var{n}, @kbd{C-h i} selects the Info buffer |
| 537 | number appended to the default @samp{*info*} buffer name | 532 | @samp{*info*<@var{n}>}. This is useful if you want to browse multiple |
| 538 | (e.g. @samp{*info*<2>}). This is useful if you want to browse | 533 | Info manuals simultaneously. If you specify just @kbd{C-u} as the |
| 539 | multiple Info manuals simultaneously. If you specify just @kbd{C-u} | 534 | prefix argument, @kbd{C-h i} prompts for the name of a documentation |
| 540 | as the prefix argument, @kbd{C-h i} prompts for the name of a | 535 | file, so you can browse a file which doesn't have an entry in the |
| 541 | documentation file. This way, you can browse a file which doesn't | 536 | top-level Info menu. |
| 542 | have an entry in the top-level Info menu. It is also handy when you | ||
| 543 | need to get to the documentation quickly, and you know the exact name | ||
| 544 | of the file. | ||
| 545 | 537 | ||
| 546 | The help commands @kbd{C-h F @var{function} @key{RET}} and @kbd{C-h | 538 | The help commands @kbd{C-h F @var{function} @key{RET}} and @kbd{C-h |
| 547 | K @var{key}}, described above, enter Info and go straight to the | 539 | K @var{key}}, described above, enter Info and go straight to the |
| @@ -550,56 +542,56 @@ documentation of @var{function} or @var{key}. | |||
| 550 | @kindex C-h S | 542 | @kindex C-h S |
| 551 | @findex info-lookup-symbol | 543 | @findex info-lookup-symbol |
| 552 | When editing a program, if you have an Info version of the manual | 544 | When editing a program, if you have an Info version of the manual |
| 553 | for the programming language, you can use the command @kbd{C-h S} | 545 | for the programming language, you can use @kbd{C-h S} |
| 554 | (@code{info-lookup-symbol}) to refer to the manual documentation for a | 546 | (@code{info-lookup-symbol}) to find symbol (keyword, function or |
| 555 | symbol (keyword, function or variable). The details of how this | 547 | variable) in the proper manual. The details of how this command works |
| 556 | command works depend on the major mode. | 548 | depend on the major mode. |
| 557 | 549 | ||
| 558 | @kindex C-h l | 550 | @kindex C-h l |
| 559 | @findex view-lossage | 551 | @findex view-lossage |
| 560 | If something surprising happens, and you are not sure what commands you | 552 | If something surprising happens, and you are not sure what you |
| 561 | typed, use @kbd{C-h l} (@code{view-lossage}). @kbd{C-h l} displays the last | 553 | typed, use @kbd{C-h l} (@code{view-lossage}). @kbd{C-h l} displays |
| 562 | 100 command characters you typed in. If you see commands that you don't | 554 | the last 100 characters you typed in Emacs. If you see commands that |
| 563 | know, you can use @kbd{C-h c} to find out what they do. | 555 | you don't know, you can use @kbd{C-h c} to find out what they do. |
| 564 | 556 | ||
| 565 | @kindex C-h e | 557 | @kindex C-h e |
| 566 | @findex view-echo-area-messages | 558 | @findex view-echo-area-messages |
| 567 | To review messages that recently appeared in the echo area, use | 559 | To review recent echo area messages, use @kbd{C-h e} |
| 568 | @kbd{C-h e} (@code{view-echo-area-messages}). This displays the | 560 | (@code{view-echo-area-messages}). This displays the buffer |
| 569 | buffer @code{*Messages*}, where those messages are kept. | 561 | @code{*Messages*}, where those messages are kept. |
| 570 | 562 | ||
| 571 | @kindex C-h m | 563 | @kindex C-h m |
| 572 | @findex describe-mode | 564 | @findex describe-mode |
| 573 | Emacs has numerous major modes, each of which redefines a few keys and | 565 | Each Emacs major mode typically redefines a few keys and makes other |
| 574 | makes a few other changes in how editing works. @kbd{C-h m} | 566 | changes in how editing works. @kbd{C-h m} (@code{describe-mode}) |
| 575 | (@code{describe-mode}) displays documentation on the current major mode, | 567 | displays documentation on the current major mode, which normally |
| 576 | which normally describes all the commands that are changed in this | 568 | describes the commands and features that are changed in this mode. |
| 577 | mode. | ||
| 578 | 569 | ||
| 579 | @kindex C-h b | 570 | @kindex C-h b |
| 580 | @findex describe-bindings | 571 | @findex describe-bindings |
| 581 | @kbd{C-h b} (@code{describe-bindings}) and @kbd{C-h s} | 572 | @kbd{C-h b} (@code{describe-bindings}) and @kbd{C-h s} |
| 582 | (@code{describe-syntax}) present other information about the current | 573 | (@code{describe-syntax}) show other information about the current |
| 583 | Emacs mode. @kbd{C-h b} displays a list of all the key bindings now in | 574 | environment within Emacs. @kbd{C-h b} displays a list of all the key |
| 584 | effect, showing the local bindings defined by the current minor modes first, | 575 | bindings now in effect: first the local bindings of the current minor |
| 585 | then the local bindings defined by the current major mode, and finally | 576 | modes, then the local bindings defined by the current major mode, and |
| 586 | the global bindings (@pxref{Key Bindings}). @kbd{C-h s} displays the | 577 | finally the global bindings (@pxref{Key Bindings}). @kbd{C-h s} |
| 587 | contents of the syntax table, with explanations of each character's | 578 | displays the contents of the syntax table, with explanations of each |
| 588 | syntax (@pxref{Syntax}). | 579 | character's syntax (@pxref{Syntax}). |
| 589 | 580 | ||
| 590 | You can get a similar list for a particular prefix key by typing | 581 | You can get a list of subcommands for a particular prefix key by |
| 591 | @kbd{C-h} after the prefix key. (There are a few prefix keys for which | 582 | typing @kbd{C-h} after the prefix key. (There are a few prefix keys |
| 592 | this does not work---those that provide their own bindings for | 583 | for which this does not work---those that provide their own bindings |
| 593 | @kbd{C-h}. One of these is @key{ESC}, because @kbd{@key{ESC} C-h} is | 584 | for @kbd{C-h}. One of these is @key{ESC}, because @kbd{@key{ESC} C-h} |
| 594 | actually @kbd{C-M-h}, which marks a defun.) | 585 | is actually @kbd{C-M-h}, which marks a defun.) |
| 595 | 586 | ||
| 596 | @node Help Files | 587 | @node Help Files |
| 597 | @section Help Files | 588 | @section Help Files |
| 598 | 589 | ||
| 599 | The Emacs help commands described above display the state of data | 590 | The Emacs help commands described above display dynamic help based |
| 600 | bases within Emacs. Emacs has a few other help commands that display | 591 | on the current state within Emacs, or refer to manuals. Other help |
| 601 | pre-written help files. These commands all have the form @kbd{C-h | 592 | commands display pre-written, static help files. These commands all |
| 602 | C-@var{char}}; that is, @kbd{C-h} followed by a control character. | 593 | have the form @kbd{C-h C-@var{char}}; that is, @kbd{C-h} followed by a |
| 594 | control character. | ||
| 603 | 595 | ||
| 604 | @kindex C-h C-c | 596 | @kindex C-h C-c |
| 605 | @findex describe-copying | 597 | @findex describe-copying |
| @@ -617,31 +609,29 @@ C-@var{char}}; that is, @kbd{C-h} followed by a control character. | |||
| 617 | @findex view-emacs-todo | 609 | @findex view-emacs-todo |
| 618 | @kindex C-h C-w | 610 | @kindex C-h C-w |
| 619 | @findex describe-no-warranty | 611 | @findex describe-no-warranty |
| 620 | The other @kbd{C-h} options display various files containing useful | ||
| 621 | information. | ||
| 622 | 612 | ||
| 623 | @table @kbd | 613 | @table @kbd |
| 624 | @item C-h C-c | 614 | @item C-h C-c |
| 625 | Displays the Emacs copying conditions (@code{describe-copying}). | 615 | Display the Emacs copying conditions (@code{describe-copying}). |
| 626 | These are the rules under which you can copy and redistribute Emacs. | 616 | These are the rules under which you can copy and redistribute Emacs. |
| 627 | @item C-h C-d | 617 | @item C-h C-d |
| 628 | Displays information on how to download or order the latest version of | 618 | Display how to download or order the latest version of |
| 629 | Emacs and other GNU software (@code{describe-distribution}). | 619 | Emacs and other GNU software (@code{describe-distribution}). |
| 630 | @item C-h C-e | 620 | @item C-h C-e |
| 631 | Displays the list of known Emacs problems, sometimes with suggested | 621 | Display the list of known Emacs problems, sometimes with suggested |
| 632 | workarounds (@code{view-emacs-problems}). | 622 | workarounds (@code{view-emacs-problems}). |
| 633 | @item C-h C-f | 623 | @item C-h C-f |
| 634 | Displays the Emacs frequently-answered-questions list (@code{view-emacs-FAQ}). | 624 | Display the Emacs frequently-answered-questions list (@code{view-emacs-FAQ}). |
| 635 | @item C-h C-n | 625 | @item C-h C-n |
| 636 | Displays the Emacs ``news'' file, which lists new Emacs features, most | 626 | Display the Emacs ``news'' file, which lists new features in the most |
| 637 | recent first (@code{view-emacs-news}). | 627 | recent version of Emacs (@code{view-emacs-news}). |
| 638 | @item C-h C-p | 628 | @item C-h C-p |
| 639 | Displays general information about the GNU Project | 629 | Display general information about the GNU Project |
| 640 | (@code{describe-project}). | 630 | (@code{describe-project}). |
| 641 | @item C-h C-t | 631 | @item C-h C-t |
| 642 | Displays the Emacs to-do list (@code{view-todo}). | 632 | Display the Emacs to-do list (@code{view-todo}). |
| 643 | @item C-h C-w | 633 | @item C-h C-w |
| 644 | Displays the full details on the complete absence of warranty for GNU | 634 | Display the full details on the complete absence of warranty for GNU |
| 645 | Emacs (@code{describe-no-warranty}). | 635 | Emacs (@code{describe-no-warranty}). |
| 646 | @end table | 636 | @end table |
| 647 | 637 | ||
| @@ -652,12 +642,12 @@ Emacs (@code{describe-no-warranty}). | |||
| 652 | @cindex balloon help | 642 | @cindex balloon help |
| 653 | When a region of text is ``active,'' so that you can select it with | 643 | When a region of text is ``active,'' so that you can select it with |
| 654 | the mouse or a key like @kbd{RET}, it often has associated help text. | 644 | the mouse or a key like @kbd{RET}, it often has associated help text. |
| 655 | Areas of the mode line are examples. On graphical displays, the help | 645 | For instance, most parts of the mode line have help text. On |
| 656 | text is displayed as a ``tooltip'' (sometimes known as ``balloon | 646 | graphical displays, the help text is displayed as a ``tooltip'' |
| 657 | help''), when you move the mouse over the active text. @xref{Tooltips}. | 647 | (sometimes known as ``balloon help''), when you move the mouse over |
| 658 | On some systems, it is shown in the echo area. On text-only | 648 | the active text. @xref{Tooltips}. On some systems, it is shown in |
| 659 | terminals, Emacs may not be able to follow the mouse and hence will | 649 | the echo area. On text-only terminals, if Emacs cannot follow the |
| 660 | not show the help text on mouse-over. | 650 | mouse, it cannot show the help text on mouse-over. |
| 661 | 651 | ||
| 662 | @kindex C-h . | 652 | @kindex C-h . |
| 663 | @findex display-local-help | 653 | @findex display-local-help |
diff --git a/man/m-x.texi b/man/m-x.texi index 9030f809cc3..c4974c5f7b4 100644 --- a/man/m-x.texi +++ b/man/m-x.texi | |||
| @@ -5,31 +5,27 @@ | |||
| 5 | @node M-x, Help, Minibuffer, Top | 5 | @node M-x, Help, Minibuffer, Top |
| 6 | @chapter Running Commands by Name | 6 | @chapter Running Commands by Name |
| 7 | 7 | ||
| 8 | Every Emacs command has a name that you can use to run it. Commands | 8 | Every Emacs command has a name that you can use to run it. For |
| 9 | that are used often, or that must be quick to type, are also bound to | 9 | convenience, many commands also have key bindings. You can run those |
| 10 | keys---short sequences of characters---for convenient use. You can | 10 | commands by typing the keys, or run them by name. Most Emacs commands |
| 11 | run them by typing the keys, or run them by name if you don't remember | 11 | have no key bindings, so the only way to run them is by name. |
| 12 | the keys. Other Emacs commands that do not need to be quick are not | 12 | (@xref{Key Bindings}, for how to set up key bindings.) |
| 13 | bound to keys; the only way to run them is by name. @xref{Key | ||
| 14 | Bindings}, for the description of how to bind commands to keys. | ||
| 15 | 13 | ||
| 16 | By convention, a command name consists of one or more words, | 14 | By convention, a command name consists of one or more words, |
| 17 | separated by hyphens; for example, @code{auto-fill-mode} or | 15 | separated by hyphens; for example, @code{auto-fill-mode} or |
| 18 | @code{manual-entry}. The use of English words makes the command name | 16 | @code{manual-entry}. Command names mostly use complete English words |
| 19 | easier to remember than a key made up of obscure characters, even | 17 | to make them easier to remember. |
| 20 | though it is more characters to type. | ||
| 21 | 18 | ||
| 22 | @kindex M-x | 19 | @kindex M-x |
| 23 | The way to run a command by name is to start with @kbd{M-x}, type the | 20 | To run a command by name, start with @kbd{M-x}, type the command |
| 24 | command name, and finish it with @key{RET}. @kbd{M-x} uses the | 21 | name, then terminate it with @key{RET}. @kbd{M-x} uses the minibuffer |
| 25 | minibuffer to read the command name. @key{RET} exits the minibuffer and | 22 | to read the command name. The string @samp{M-x} appears at the |
| 26 | runs the command. The string @samp{M-x} appears at the beginning of the | 23 | beginning of the minibuffer as a @dfn{prompt} to remind you to enter a |
| 27 | minibuffer as a @dfn{prompt} to remind you to enter the name of a | 24 | command name to be run. @key{RET} exits the minibuffer and runs the |
| 28 | command to be run. @xref{Minibuffer}, for full information on the | 25 | command. @xref{Minibuffer}, for more information on the minibuffer. |
| 29 | features of the minibuffer. | ||
| 30 | 26 | ||
| 31 | You can use completion to enter the command name. For example, you | 27 | You can use completion to enter the command name. For example, you |
| 32 | can invoke the command @code{forward-char} by name by typing either | 28 | to invoke the command @code{forward-char}, you can type |
| 33 | 29 | ||
| 34 | @example | 30 | @example |
| 35 | M-x forward-char @key{RET} | 31 | M-x forward-char @key{RET} |
| @@ -44,32 +40,30 @@ M-x forw @key{TAB} c @key{RET} | |||
| 44 | 40 | ||
| 45 | @noindent | 41 | @noindent |
| 46 | Note that @code{forward-char} is the same command that you invoke with | 42 | Note that @code{forward-char} is the same command that you invoke with |
| 47 | the key @kbd{C-f}. You can run any Emacs command by name using | 43 | the key @kbd{C-f}. The existence of a key binding does not stop you |
| 48 | @kbd{M-x}, whether or not any keys are bound to it. | 44 | from running the command by name. |
| 49 | 45 | ||
| 50 | If you type @kbd{C-g} while the command name is being read, that | 46 | To cancel the @kbd{M-x} and not run a command, type @kbd{C-g} instead |
| 51 | cancels the @kbd{M-x} command and exits the minibuffer, so you end up | 47 | of entering the command name. This takes you back to command level. |
| 52 | back at command level. | ||
| 53 | 48 | ||
| 54 | To pass a numeric argument to the command you are invoking with | 49 | To pass a numeric argument to the command you are invoking with |
| 55 | @kbd{M-x}, specify the numeric argument before the @kbd{M-x}. @kbd{M-x} | 50 | @kbd{M-x}, specify the numeric argument before @kbd{M-x}. The |
| 56 | passes the argument along to the command it runs. The argument value | 51 | argument value appears in the prompt while the command name is being |
| 57 | appears in the prompt while the command name is being read. | 52 | read, and finally @kbd{M-x} passes the argument to that command. |
| 58 | 53 | ||
| 59 | @vindex suggest-key-bindings | 54 | @vindex suggest-key-bindings |
| 60 | If the command you type has a key binding of its own, Emacs mentions | 55 | When the command you run with @kbd{M-x} has a key binding, Emacs |
| 61 | this in the echo area after running the command. For example, if you | 56 | mentions this in the echo area after running the command. For |
| 62 | type @kbd{M-x forward-word}, the message says that you can run the | 57 | example, if you type @kbd{M-x forward-word}, the message says that you |
| 63 | same command more easily by typing @kbd{M-f}. You can turn off these | 58 | can run the same command by typing @kbd{M-f}. You can turn off these |
| 64 | messages by setting the variable @code{suggest-key-bindings} to | 59 | messages by setting the variable @code{suggest-key-bindings} to |
| 65 | @code{nil}. | 60 | @code{nil}. |
| 66 | 61 | ||
| 67 | Normally, when describing in this manual a command that is run by | 62 | In this manual, when we speak of running a command by name, we often |
| 68 | name, we omit the @key{RET} that is needed to terminate the name. Thus | 63 | omit the @key{RET} that terminates the name. Thus we might say |
| 69 | we might speak of @kbd{M-x auto-fill-mode} rather than @kbd{M-x | 64 | @kbd{M-x auto-fill-mode} rather than @kbd{M-x auto-fill-mode |
| 70 | auto-fill-mode @key{RET}}. We mention the @key{RET} only when there is | 65 | @key{RET}}. We mention the @key{RET} only for emphasis, such as when |
| 71 | a need to emphasize its presence, such as when we show the command | 66 | the command is followed by arguments. |
| 72 | together with following arguments. | ||
| 73 | 67 | ||
| 74 | @findex execute-extended-command | 68 | @findex execute-extended-command |
| 75 | @kbd{M-x} works by running the command | 69 | @kbd{M-x} works by running the command |