diff options
| author | Chong Yidong | 2011-12-05 00:19:57 +0800 |
|---|---|---|
| committer | Chong Yidong | 2011-12-05 00:19:57 +0800 |
| commit | ec7ae0329e5cfda066433f8c5d5daa6e0d1dde14 (patch) | |
| tree | f0c898ab4e8b7e1e7810c09048fa1934be063be2 /doc | |
| parent | 6d5eb5b0d2e50b0dd153a988cc52492cb77fc333 (diff) | |
| download | emacs-ec7ae0329e5cfda066433f8c5d5daa6e0d1dde14.tar.gz emacs-ec7ae0329e5cfda066433f8c5d5daa6e0d1dde14.zip | |
Updates to Programs chapter of Emacs manual.
* programs.texi (Program Modes): Mention modes that are not
included with Emacs. Fix references to other manuals for tex.
Add index entry for backward-delete-char-untabify. Mention
prog-mode-hook.
(Which Function): Use "global minor mode" terminology.
(Basic Indent, Multi-line Indent): Refer to previous descriptions
in Indentation chapter to avoid duplication.
(Expressions): Copyedit.
(Matching): Document Electric Pair mode.
* ack.texi (Acknowledgments):
* rmail.texi (Movemail, Other Mailbox Formats):
* frames.texi (Frames): Don't capitalize "Unix".
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 16 | ||||
| -rw-r--r-- | doc/emacs/ack.texi | 4 | ||||
| -rw-r--r-- | doc/emacs/frames.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/programs.texi | 453 | ||||
| -rw-r--r-- | doc/emacs/rmail.texi | 27 | ||||
| -rw-r--r-- | doc/emacs/text.texi | 20 |
6 files changed, 265 insertions, 257 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index e55c1026786..df1812d27ec 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,5 +1,21 @@ | |||
| 1 | 2011-12-04 Chong Yidong <cyd@gnu.org> | 1 | 2011-12-04 Chong Yidong <cyd@gnu.org> |
| 2 | 2 | ||
| 3 | * programs.texi (Program Modes): Mention modes that are not | ||
| 4 | included with Emacs. Fix references to other manuals for tex. | ||
| 5 | Add index entry for backward-delete-char-untabify. Mention | ||
| 6 | prog-mode-hook. | ||
| 7 | (Which Function): Use "global minor mode" terminology. | ||
| 8 | (Basic Indent, Multi-line Indent): Refer to previous descriptions | ||
| 9 | in Indentation chapter to avoid duplication. | ||
| 10 | (Expressions): Copyedit. | ||
| 11 | (Matching): Document Electric Pair mode. | ||
| 12 | |||
| 13 | * ack.texi (Acknowledgments): | ||
| 14 | * rmail.texi (Movemail, Other Mailbox Formats): | ||
| 15 | * frames.texi (Frames): Don't capitalize "Unix". | ||
| 16 | |||
| 17 | 2011-12-04 Chong Yidong <cyd@gnu.org> | ||
| 18 | |||
| 3 | * text.texi (Nroff Mode): Mention what nroff is. | 19 | * text.texi (Nroff Mode): Mention what nroff is. |
| 4 | (Text Based Tables, Table Recognition): Don't say "Table mode" | 20 | (Text Based Tables, Table Recognition): Don't say "Table mode" |
| 5 | since it's not a major or minor mode. | 21 | since it's not a major or minor mode. |
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index d7022ba739b..ae6338ce5a6 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi | |||
| @@ -1272,8 +1272,8 @@ Colin Walters wrote Ibuffer, an enhanced buffer menu. | |||
| 1272 | Barry Warsaw wrote @file{assoc.el}, a set of utility functions for | 1272 | Barry Warsaw wrote @file{assoc.el}, a set of utility functions for |
| 1273 | working with association lists; @file{cc-mode.el}, a mode for editing | 1273 | working with association lists; @file{cc-mode.el}, a mode for editing |
| 1274 | C, C@t{++}, and Java code, based on earlier work by Dave Detlefs, | 1274 | C, C@t{++}, and Java code, based on earlier work by Dave Detlefs, |
| 1275 | Stewart Clamen, and Richard Stallman; @file{elp.el}, a profiler | 1275 | Stewart Clamen, and Richard Stallman; @file{elp.el}, a profiler for |
| 1276 | for Emacs Lisp programs; @file{man.el}, a mode for reading UNIX manual | 1276 | Emacs Lisp programs; @file{man.el}, a mode for reading Unix manual |
| 1277 | pages; @file{regi.el}, providing an AWK-like functionality for use in | 1277 | pages; @file{regi.el}, providing an AWK-like functionality for use in |
| 1278 | lisp programs; @file{reporter.el}, providing customizable bug | 1278 | lisp programs; @file{reporter.el}, providing customizable bug |
| 1279 | reporting for lisp packages; and @file{supercite.el}, a minor mode for | 1279 | reporting for lisp packages; and @file{supercite.el}, a minor mode for |
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 1445d25be15..dec5aa771ea 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi | |||
| @@ -32,7 +32,7 @@ unavailable. However, it is still possible to create multiple | |||
| 32 | ``frames'' on text-only terminals; such frames are displayed one at a | 32 | ``frames'' on text-only terminals; such frames are displayed one at a |
| 33 | time, filling the entire terminal screen (@pxref{Non-Window | 33 | time, filling the entire terminal screen (@pxref{Non-Window |
| 34 | Terminals}). It is also possible to use the mouse on some text-only | 34 | Terminals}). It is also possible to use the mouse on some text-only |
| 35 | terminals (@pxref{Text-Only Mouse}, for doing so on GNU and UNIX | 35 | terminals (@pxref{Text-Only Mouse}, for doing so on GNU and Unix |
| 36 | systems; and | 36 | systems; and |
| 37 | @iftex | 37 | @iftex |
| 38 | @pxref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}, | 38 | @pxref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}, |
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 675977c2c35..66f7a49faab 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi | |||
| @@ -8,8 +8,8 @@ | |||
| 8 | @cindex C editing | 8 | @cindex C editing |
| 9 | @cindex program editing | 9 | @cindex program editing |
| 10 | 10 | ||
| 11 | Emacs provides many features to facilitate editing programs. Some | 11 | This chapter describes Emacs features for facilitating editing |
| 12 | of these features can | 12 | programs. Some of these features can: |
| 13 | 13 | ||
| 14 | @itemize @bullet | 14 | @itemize @bullet |
| 15 | @item | 15 | @item |
| @@ -25,8 +25,6 @@ Insert, kill or align comments (@pxref{Comments}). | |||
| 25 | Highlight program syntax (@pxref{Font Lock}). | 25 | Highlight program syntax (@pxref{Font Lock}). |
| 26 | @end itemize | 26 | @end itemize |
| 27 | 27 | ||
| 28 | This chapter describes these features and many more. | ||
| 29 | |||
| 30 | @menu | 28 | @menu |
| 31 | * Program Modes:: Major modes for editing programs. | 29 | * Program Modes:: Major modes for editing programs. |
| 32 | * Defuns:: Commands to operate on major top-level parts | 30 | * Defuns:: Commands to operate on major top-level parts |
| @@ -52,21 +50,14 @@ Highlight program syntax (@pxref{Font Lock}). | |||
| 52 | @section Major Modes for Programming Languages | 50 | @section Major Modes for Programming Languages |
| 53 | @cindex modes for programming languages | 51 | @cindex modes for programming languages |
| 54 | 52 | ||
| 55 | Emacs has specialized major modes for various programming languages. | 53 | Emacs has specialized major modes (@pxref{Major Modes}) for many |
| 56 | @xref{Major Modes}. A programming language major mode typically | 54 | programming languages. A programming language mode typically |
| 57 | specifies the syntax of expressions, the customary rules for | 55 | specifies the syntax of expressions, the customary rules for |
| 58 | indentation, how to do syntax highlighting for the language, and how | 56 | indentation, how to do syntax highlighting for the language, and how |
| 59 | to find the beginning or end of a function definition. It often | 57 | to find the beginning or end of a function definition. It often has |
| 60 | customizes or provides facilities for compiling and debugging programs | 58 | features for compiling and debugging programs as well. The major mode |
| 61 | as well. | 59 | for each language is named after the language; for instance, the major |
| 62 | 60 | mode for the C programming language is @code{c-mode}. | |
| 63 | Ideally, Emacs should provide a major mode for each programming | ||
| 64 | language that you might want to edit; if it doesn't have a mode for | ||
| 65 | your favorite language, you can contribute one. But often the mode | ||
| 66 | for one language can serve for other syntactically similar languages. | ||
| 67 | The major mode for language @var{l} is called @code{@var{l}-mode}, | ||
| 68 | and you can select it by typing @kbd{M-x @var{l}-mode @key{RET}}. | ||
| 69 | @xref{Choosing Modes}. | ||
| 70 | 61 | ||
| 71 | @cindex Perl mode | 62 | @cindex Perl mode |
| 72 | @cindex Icon mode | 63 | @cindex Icon mode |
| @@ -89,40 +80,32 @@ and you can select it by typing @kbd{M-x @var{l}-mode @key{RET}}. | |||
| 89 | @cindex Conf mode | 80 | @cindex Conf mode |
| 90 | @cindex DNS mode | 81 | @cindex DNS mode |
| 91 | @cindex Javascript mode | 82 | @cindex Javascript mode |
| 92 | The existing programming language major modes include Lisp, Scheme | 83 | Emacs has programming language modes for Lisp, Scheme, the |
| 93 | (a variant of Lisp) and the Scheme-based DSSSL expression language, | 84 | Scheme-based DSSSL expression language, Ada, ASM, AWK, C, C++, Delphi, |
| 94 | Ada, ASM, AWK, C, C++, Delphi (Object Pascal), Fortran, Icon, IDL | 85 | Fortran, Icon, IDL (CORBA), IDLWAVE, Java, Javascript, Metafont |
| 95 | (CORBA), IDLWAVE, Java, Javascript, Metafont (@TeX{}'s companion for | 86 | (@TeX{}'s companion for font creation), Modula2, Objective-C, Octave, |
| 96 | font creation), Modula2, Objective-C, Octave, Pascal, Perl, Pike, | 87 | Pascal, Perl, Pike, PostScript, Prolog, Python, Ruby, Simula, Tcl, and |
| 97 | PostScript, Prolog, Python, Ruby, Simula, Tcl, and VHDL. An | 88 | VHDL. An alternative mode for Perl is called CPerl mode. Modes are |
| 98 | alternative mode for Perl is called CPerl mode. Modes are available | 89 | also available for the scripting languages of the common GNU and Unix |
| 99 | for the scripting languages of the common GNU and Unix shells, VMS | 90 | shells, VMS DCL, and MS-DOS/MS-Windows @samp{BAT} files, and for |
| 100 | DCL, and MS-DOS/MS-Windows @samp{BAT} files. There are also major | 91 | makefiles, DNS master files, and various sorts of configuration files. |
| 101 | modes for editing makefiles, DNS master files, and various sorts of | 92 | |
| 102 | configuration files. | 93 | Ideally, Emacs should have a major mode for each programming |
| 94 | language that you might want to edit. If it doesn't have a mode for | ||
| 95 | your favorite language, the mode might be implemented in a package not | ||
| 96 | distributed with Emacs (@pxref{Packages}); or you can contribute one. | ||
| 103 | 97 | ||
| 104 | @kindex DEL @r{(programming modes)} | 98 | @kindex DEL @r{(programming modes)} |
| 105 | @findex c-electric-backspace | 99 | @findex c-electric-backspace |
| 100 | @findex backward-delete-char-untabify | ||
| 106 | In most programming languages, indentation should vary from line to | 101 | In most programming languages, indentation should vary from line to |
| 107 | line to illustrate the structure of the program. So the major modes | 102 | line to illustrate the structure of the program. Therefore, in most |
| 108 | for programming languages arrange for @key{TAB} to update the | 103 | programming language modes, typing @key{TAB} updates the indentation |
| 109 | indentation of the current line (@pxref{Program Indent}). They also | 104 | of the current line (@pxref{Program Indent}). Furthermore, @key{DEL} |
| 110 | rebind @key{DEL} to treat a tab as if it were the equivalent number of | 105 | is usually bound to @code{backward-delete-char-untabify}, which |
| 111 | spaces; this lets you delete one column of indentation without | 106 | deletes backward treating each tab as if it were the equivalent number |
| 112 | worrying whether the whitespace consists of spaces or tabs. Use | 107 | of spaces, so that you can delete one column of indentation without |
| 113 | @kbd{C-b C-d} to delete a tab character before point, in these modes. | 108 | worrying whether the whitespace consists of spaces or tabs. |
| 114 | |||
| 115 | Separate manuals are available for the modes for Ada (@pxref{Top, , Ada | ||
| 116 | Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK | ||
| 117 | (@pxref{Top, , CC Mode, ccmode, CC Mode}) and the IDLWAVE modes | ||
| 118 | (@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}). For Fortran | ||
| 119 | mode, see | ||
| 120 | @iftex | ||
| 121 | @ref{Fortran,,, emacs-xtra, Specialized Emacs Features}. | ||
| 122 | @end iftex | ||
| 123 | @ifnottex | ||
| 124 | @ref{Fortran}. | ||
| 125 | @end ifnottex | ||
| 126 | 109 | ||
| 127 | @cindex mode hook | 110 | @cindex mode hook |
| 128 | @vindex c-mode-hook | 111 | @vindex c-mode-hook |
| @@ -130,13 +113,24 @@ mode, see | |||
| 130 | @vindex emacs-lisp-mode-hook | 113 | @vindex emacs-lisp-mode-hook |
| 131 | @vindex lisp-interaction-mode-hook | 114 | @vindex lisp-interaction-mode-hook |
| 132 | @vindex scheme-mode-hook | 115 | @vindex scheme-mode-hook |
| 133 | Turning on a major mode runs a normal hook called the @dfn{mode | 116 | Entering a programming language mode runs the custom Lisp functions |
| 134 | hook}, which is the value of a Lisp variable. Each major mode has a | 117 | specified in the hook variable @code{prog-mode-hook}, followed by |
| 135 | mode hook, and the hook's name is always made from the mode command's | 118 | those specified in the mode's own mode hook (@pxref{Major Modes}). |
| 136 | name by adding @samp{-hook}. For example, turning on C mode runs the | 119 | For instance, entering C mode runs the hooks @code{prog-mode-hook} and |
| 137 | hook @code{c-mode-hook}, while turning on Lisp mode runs the hook | 120 | @code{c-mode-hook}. @xref{Hooks}, for information about hooks. |
| 138 | @code{lisp-mode-hook}. The purpose of the mode hook is to give you a | 121 | |
| 139 | place to set up customizations for that major mode. @xref{Hooks}. | 122 | @ifinfo |
| 123 | Separate manuals are available for the modes for Ada (@pxref{Top,, | ||
| 124 | Ada Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba | ||
| 125 | IDL/Pike/AWK (@pxref{Top, , CC Mode, ccmode, CC Mode}), and IDLWAVE | ||
| 126 | (@pxref{Top,, IDLWAVE, idlwave, IDLWAVE User Manual}). | ||
| 127 | @end ifinfo | ||
| 128 | @ifnotinfo | ||
| 129 | The Emacs distribution contains Info manuals for the major modes for | ||
| 130 | Ada, C/C++/Objective C/Java/Corba IDL/Pike/AWK, and IDLWAVE. For | ||
| 131 | Fortran mode, see the ``Fortran'' section in the Info version of the | ||
| 132 | Emacs manual, which is not included in this printed version. | ||
| 133 | @end ifnotinfo | ||
| 140 | 134 | ||
| 141 | @node Defuns | 135 | @node Defuns |
| 142 | @section Top-Level Definitions, or Defuns | 136 | @section Top-Level Definitions, or Defuns |
| @@ -328,20 +322,19 @@ The Speedbar can also use it (@pxref{Speedbar}). | |||
| 328 | @subsection Which Function Mode | 322 | @subsection Which Function Mode |
| 329 | @cindex current function name in mode line | 323 | @cindex current function name in mode line |
| 330 | 324 | ||
| 331 | Which Function mode is a minor mode that displays the current | 325 | Which Function mode is a global minor mode (@pxref{Minor Modes}) |
| 332 | function name in the mode line, updating it as you move around in a | 326 | which displays the current function name in the mode line, updating it |
| 333 | buffer. | 327 | as you move around in a buffer. |
| 334 | 328 | ||
| 335 | @findex which-function-mode | 329 | @findex which-function-mode |
| 336 | @vindex which-func-modes | 330 | @vindex which-func-modes |
| 337 | To either enable or disable Which Function mode, use the command | 331 | To either enable or disable Which Function mode, use the command |
| 338 | @kbd{M-x which-function-mode}. This command applies to all buffers, | 332 | @kbd{M-x which-function-mode}. Although Which Function mode is a |
| 339 | both existing ones and those yet to be created. However, it takes | 333 | global minor mode, it takes effect only in certain major modes: those |
| 340 | effect only in certain major modes, those listed in the value of | 334 | listed in the variable @code{which-func-modes}. If the value of |
| 341 | @code{which-func-modes}. If the value of @code{which-func-modes} is | 335 | @code{which-func-modes} is @code{t} rather than a list of modes, then |
| 342 | @code{t} rather than a list of modes, then Which Function mode applies | 336 | Which Function mode applies to all major modes that know how to |
| 343 | to all major modes that know how to support it---in other words, all | 337 | support it---in other words, all the major modes that support Imenu. |
| 344 | the major modes that support Imenu. | ||
| 345 | 338 | ||
| 346 | @node Program Indent | 339 | @node Program Indent |
| 347 | @section Indentation for Programs | 340 | @section Indentation for Programs |
| @@ -352,6 +345,10 @@ reindent it as you change it. Emacs has commands to indent either a | |||
| 352 | single line, a specified number of lines, or all of the lines inside a | 345 | single line, a specified number of lines, or all of the lines inside a |
| 353 | single parenthetical grouping. | 346 | single parenthetical grouping. |
| 354 | 347 | ||
| 348 | @xref{Indentation}, for general information about indentation. This | ||
| 349 | section describes indentation features specific to programming | ||
| 350 | language modes. | ||
| 351 | |||
| 355 | @menu | 352 | @menu |
| 356 | * Basic Indent:: Indenting a single line. | 353 | * Basic Indent:: Indenting a single line. |
| 357 | * Multi-line Indent:: Commands to reindent many lines at once. | 354 | * Multi-line Indent:: Commands to reindent many lines at once. |
| @@ -361,18 +358,15 @@ single parenthetical grouping. | |||
| 361 | @end menu | 358 | @end menu |
| 362 | 359 | ||
| 363 | @cindex pretty-printer | 360 | @cindex pretty-printer |
| 364 | Emacs also provides a Lisp pretty-printer in the library @code{pp}. | 361 | Emacs also provides a Lisp pretty-printer in the @code{pp} package, |
| 365 | This program reformats a Lisp object with indentation chosen to look nice. | 362 | which reformats Lisp objects with nice-looking indentation. |
| 366 | 363 | ||
| 367 | @node Basic Indent | 364 | @node Basic Indent |
| 368 | @subsection Basic Program Indentation Commands | 365 | @subsection Basic Program Indentation Commands |
| 369 | 366 | ||
| 370 | The basic indentation commands indent a single line according to the | ||
| 371 | usual conventions of the language you are editing. | ||
| 372 | |||
| 373 | @table @kbd | 367 | @table @kbd |
| 374 | @item @key{TAB} | 368 | @item @key{TAB} |
| 375 | Adjust indentation of current line. | 369 | Adjust indentation of current line (@code{indent-for-tab-command}). |
| 376 | @item C-j | 370 | @item C-j |
| 377 | Insert a newline, then adjust indentation of following line | 371 | Insert a newline, then adjust indentation of following line |
| 378 | (@code{newline-and-indent}). | 372 | (@code{newline-and-indent}). |
| @@ -382,65 +376,50 @@ Insert a newline, then adjust indentation of following line | |||
| 382 | @findex c-indent-command | 376 | @findex c-indent-command |
| 383 | @findex indent-line-function | 377 | @findex indent-line-function |
| 384 | @findex indent-for-tab-command | 378 | @findex indent-for-tab-command |
| 385 | The basic indentation command is @key{TAB}. In any | 379 | The basic indentation command is @key{TAB} |
| 386 | programming-language major mode, @key{TAB} gives the current line the | 380 | (@code{indent-for-tab-command}), which was documented in |
| 387 | correct indentation as determined from the previous lines. It does | 381 | @ref{Indentation}. In programming language modes, @key{TAB} indents |
| 388 | this by inserting or deleting whitespace at the beginning of the | 382 | the current line, based on the indentation and syntactic content of |
| 389 | current line. If point was inside the whitespace at the beginning of | 383 | the preceding lines; if the region is active, @key{TAB} indents each |
| 390 | the line, @key{TAB} puts it at the end of that whitespace; otherwise, | 384 | line within the region, not just the current line. |
| 391 | @key{TAB} keeps point fixed with respect to the characters around it. | ||
| 392 | If the region is active (@pxref{Mark}), @key{TAB} indents every line | ||
| 393 | within the region instead of just the current line. The function that | ||
| 394 | @key{TAB} runs depends on the major mode; for instance, it is | ||
| 395 | @code{c-indent-line-or-region} in C mode. Each function is aware of | ||
| 396 | the syntax and conventions for its particular language. | ||
| 397 | |||
| 398 | Use @kbd{C-q @key{TAB}} to insert a tab character at point. | ||
| 399 | 385 | ||
| 400 | @kindex C-j @r{(indenting source code)} | 386 | @kindex C-j @r{(indenting source code)} |
| 401 | @findex newline-and-indent | 387 | @findex newline-and-indent |
| 402 | When entering lines of new code, use @kbd{C-j} | 388 | The command @kbd{C-j} (@code{newline-and-indent}), which was |
| 403 | (@code{newline-and-indent}), which inserts a newline and then adjusts | 389 | documented in @ref{Indentation Commands}, does the same as @key{RET} |
| 404 | indentation after it. (It also deletes any trailing whitespace which | 390 | followed by @key{TAB}: it inserts a new line, then adjusts the line's |
| 405 | remains before the new newline.) For instance, @kbd{C-j} at the end | 391 | indentation. |
| 406 | of a line creates a blank line with appropriate indentation. In | 392 | |
| 407 | programming language modes, it is equivalent to @key{RET} @key{TAB}. | 393 | When indenting a line that starts within a parenthetical grouping, |
| 408 | 394 | Emacs usually places the start of the line under the preceding line | |
| 409 | When Emacs indents a line that starts within a parenthetical | 395 | within the group, or under the text after the parenthesis. If you |
| 410 | grouping, it usually places the start of the line under the preceding | 396 | manually give one of these lines a nonstandard indentation (e.g.@: for |
| 411 | line within the group, or under the text after the parenthesis. If | 397 | aesthetic purposes), the lines below will follow it. |
| 412 | you manually give one of these lines a nonstandard indentation, the | 398 | |
| 413 | lines below will tend to follow it. This behavior is convenient in | 399 | The indentation commands for most programming language modes assume |
| 414 | cases where you have overridden the standard result of @key{TAB} | 400 | that a open-parenthesis, open-brace or other opening delimiter at the |
| 415 | indentation (e.g., for aesthetic purposes). | 401 | left margin is the start of a function. If the code you are editing |
| 416 | 402 | violates this assumption---even if the delimiters occur in strings or | |
| 417 | Many programming-language modes assume that an open-parenthesis, | 403 | comments---you must set @code{open-paren-in-column-0-is-defun-start} |
| 418 | open-brace or other opening delimiter at the left margin is the start | 404 | to @code{nil} for indentation to work properly. @xref{Left Margin |
| 419 | of a function. This assumption speeds up indentation commands. If | ||
| 420 | the text you are editing contains opening delimiters in column zero | ||
| 421 | that aren't the beginning of a functions---even if these delimiters | ||
| 422 | occur inside strings or comments---then you must set | ||
| 423 | @code{open-paren-in-column-0-is-defun-start}. @xref{Left Margin | ||
| 424 | Paren}. | 405 | Paren}. |
| 425 | 406 | ||
| 426 | Normally, Emacs indents lines using an ``optimal'' mix of tab and | ||
| 427 | space characters. If you want Emacs to use spaces only, set | ||
| 428 | @code{indent-tabs-mode} (@pxref{Just Spaces}). | ||
| 429 | |||
| 430 | @node Multi-line Indent | 407 | @node Multi-line Indent |
| 431 | @subsection Indenting Several Lines | 408 | @subsection Indenting Several Lines |
| 432 | 409 | ||
| 433 | Sometimes, you may want to reindent several lines of code at a time. | 410 | Sometimes, you may want to reindent several lines of code at a time. |
| 434 | One way to do this is to use the mark; when the mark is active and the | 411 | One way to do this is to use the mark; when the mark is active and the |
| 435 | region is non-empty, @key{TAB} indents every line within the region. | 412 | region is non-empty, @key{TAB} indents every line in the region. |
| 436 | In addition, Emacs provides several other commands for indenting large | 413 | Alternatively, the command @kbd{C-M-\} (@code{indent-region}) indents |
| 437 | chunks of code: | 414 | every line in the region, whether or not the mark is active |
| 415 | (@pxref{Indentation Commands}). | ||
| 416 | |||
| 417 | In addition, Emacs provides the following commands for indenting | ||
| 418 | large chunks of code: | ||
| 438 | 419 | ||
| 439 | @table @kbd | 420 | @table @kbd |
| 440 | @item C-M-q | 421 | @item C-M-q |
| 441 | Reindent all the lines within one parenthetical grouping. | 422 | Reindent all the lines within one parenthetical grouping. |
| 442 | @item C-M-\ | ||
| 443 | Reindent all lines in the region (@code{indent-region}). | ||
| 444 | @item C-u @key{TAB} | 423 | @item C-u @key{TAB} |
| 445 | Shift an entire parenthetical grouping rigidly sideways so that its | 424 | Shift an entire parenthetical grouping rigidly sideways so that its |
| 446 | first line is properly indented. | 425 | first line is properly indented. |
| @@ -454,18 +433,13 @@ lines that start inside comments and strings. | |||
| 454 | To reindent the contents of a single parenthetical grouping, | 433 | To reindent the contents of a single parenthetical grouping, |
| 455 | position point before the beginning of the grouping and type | 434 | position point before the beginning of the grouping and type |
| 456 | @kbd{C-M-q}. This changes the relative indentation within the | 435 | @kbd{C-M-q}. This changes the relative indentation within the |
| 457 | grouping, without affecting its overall indentation (i.e., the | 436 | grouping, without affecting its overall indentation (i.e.@: the |
| 458 | indentation of the line where the grouping starts). The function that | 437 | indentation of the line where the grouping starts). The function that |
| 459 | @kbd{C-M-q} runs depends on the major mode; it is | 438 | @kbd{C-M-q} runs depends on the major mode; it is |
| 460 | @code{indent-pp-sexp} in Lisp mode, @code{c-indent-exp} in C mode, | 439 | @code{indent-pp-sexp} in Lisp mode, @code{c-indent-exp} in C mode, |
| 461 | etc. To correct the overall indentation as well, type @key{TAB} | 440 | etc. To correct the overall indentation as well, type @key{TAB} |
| 462 | first. | 441 | first. |
| 463 | 442 | ||
| 464 | @kbd{C-M-\} (@code{indent-region}) applies @key{TAB} to the region. | ||
| 465 | This is useful when Transient Mark mode is disabled (@pxref{Disabled | ||
| 466 | Transient Mark}), because in that case @key{TAB} does not act on the | ||
| 467 | region. | ||
| 468 | |||
| 469 | @kindex C-u TAB | 443 | @kindex C-u TAB |
| 470 | If you like the relative indentation within a grouping but not the | 444 | If you like the relative indentation within a grouping but not the |
| 471 | indentation of its first line, move point to that first line and type | 445 | indentation of its first line, move point to that first line and type |
| @@ -516,9 +490,9 @@ expression. | |||
| 516 | @cindex @code{lisp-indent-function} property | 490 | @cindex @code{lisp-indent-function} property |
| 517 | You can override the standard pattern in various ways for individual | 491 | You can override the standard pattern in various ways for individual |
| 518 | functions, according to the @code{lisp-indent-function} property of | 492 | functions, according to the @code{lisp-indent-function} property of |
| 519 | the function name. Normally you would use this for macro definitions | 493 | the function name. This is normally done for macro definitions, using |
| 520 | and specify it using the @code{declare} construct (@pxref{Defining | 494 | the @code{declare} construct. @xref{Defining Macros,,, elisp, the |
| 521 | Macros,,, elisp, the Emacs Lisp Reference Manual}). | 495 | Emacs Lisp Reference Manual}. |
| 522 | 496 | ||
| 523 | @node C Indent | 497 | @node C Indent |
| 524 | @subsection Commands for C Indentation | 498 | @subsection Commands for C Indentation |
| @@ -664,9 +638,13 @@ parentheses and unbalanced string quotes in the buffer. | |||
| 664 | @cindex sexp | 638 | @cindex sexp |
| 665 | @cindex expression | 639 | @cindex expression |
| 666 | @cindex balanced expression | 640 | @cindex balanced expression |
| 667 | These commands deal with balanced expressions, also called | 641 | Each programming language mode has its own definition of a |
| 668 | @dfn{sexps}@footnote{The word ``sexp'' is used to refer to an | 642 | @dfn{balanced expression}. Balanced expressions typically include |
| 669 | expression in Lisp.}. | 643 | individual symbols, numbers, and string constants, as well as pieces |
| 644 | of code enclosed in a matching pair of delimiters. The following | ||
| 645 | commands deal with balanced expressions (in Emacs, such expressions | ||
| 646 | are referred to internally as @dfn{sexps}@footnote{The word ``sexp'' | ||
| 647 | is used to refer to an expression in Lisp.}). | ||
| 670 | 648 | ||
| 671 | @table @kbd | 649 | @table @kbd |
| 672 | @item C-M-f | 650 | @item C-M-f |
| @@ -682,90 +660,71 @@ Transpose expressions (@code{transpose-sexps}). | |||
| 682 | Put mark after following expression (@code{mark-sexp}). | 660 | Put mark after following expression (@code{mark-sexp}). |
| 683 | @end table | 661 | @end table |
| 684 | 662 | ||
| 685 | Each programming language major mode customizes the definition of | ||
| 686 | balanced expressions to suit that language. Balanced expressions | ||
| 687 | typically include symbols, numbers, and string constants, as well as | ||
| 688 | any pair of matching delimiters and their contents. Some languages | ||
| 689 | have obscure forms of expression syntax that nobody has bothered to | ||
| 690 | implement in Emacs. | ||
| 691 | |||
| 692 | @cindex Control-Meta | ||
| 693 | By convention, the keys for these commands are all Control-Meta | ||
| 694 | characters. They usually act on expressions just as the corresponding | ||
| 695 | Meta characters act on words. For instance, the command @kbd{C-M-b} | ||
| 696 | moves backward over a balanced expression, just as @kbd{M-b} moves | ||
| 697 | back over a word. | ||
| 698 | |||
| 699 | @kindex C-M-f | 663 | @kindex C-M-f |
| 700 | @kindex C-M-b | 664 | @kindex C-M-b |
| 701 | @findex forward-sexp | 665 | @findex forward-sexp |
| 702 | @findex backward-sexp | 666 | @findex backward-sexp |
| 703 | To move forward over a balanced expression, use @kbd{C-M-f} | 667 | To move forward over a balanced expression, use @kbd{C-M-f} |
| 704 | (@code{forward-sexp}). If the first significant character after point | 668 | (@code{forward-sexp}). If the first significant character after point |
| 705 | is an opening delimiter (@samp{(} in Lisp; @samp{(}, @samp{[} or | 669 | is an opening delimiter (e.g.@: @samp{(}, @samp{[} or @samp{@{} in C), |
| 706 | @samp{@{} in C), @kbd{C-M-f} moves past the matching closing | 670 | this command moves past the matching closing delimiter. If the |
| 707 | delimiter. If the character begins a symbol, string, or number, | 671 | character begins a symbol, string, or number, the command moves over |
| 708 | @kbd{C-M-f} moves over that. | 672 | that. |
| 709 | 673 | ||
| 710 | The command @kbd{C-M-b} (@code{backward-sexp}) moves backward over a | 674 | The command @kbd{C-M-b} (@code{backward-sexp}) moves backward over a |
| 711 | balanced expression. The detailed rules are like those above for | 675 | balanced expression---like @kbd{C-M-f}, but in the reverse direction. |
| 712 | @kbd{C-M-f}, but with directions reversed. If there are prefix | 676 | If the expression is preceded by any prefix characters (single-quote, |
| 713 | characters (single-quote, backquote and comma, in Lisp) preceding the | 677 | backquote and comma, in Lisp), the command moves back over them as |
| 714 | expression, @kbd{C-M-b} moves back over them as well. The balanced | 678 | well. |
| 715 | expression commands move across comments as if they were whitespace, | 679 | |
| 716 | in most modes. | 680 | @kbd{C-M-f} or @kbd{C-M-b} with an argument repeats that operation |
| 717 | 681 | the specified number of times; with a negative argument means to move | |
| 718 | @kbd{C-M-f} or @kbd{C-M-b} with an argument repeats that operation the | 682 | in the opposite direction. In most modes, these two commands move |
| 719 | specified number of times; with a negative argument, it moves in the | 683 | across comments as if they were whitespace. Note that their keys, |
| 720 | opposite direction. | 684 | @kbd{C-M-f} and @kbd{C-M-b}, are analogous to @kbd{C-f} and @kbd{C-b}, |
| 685 | which move by characters (@pxref{Moving Point}), and @kbd{M-f} and | ||
| 686 | @kbd{M-b}, which move by words (@pxref{Words}). | ||
| 721 | 687 | ||
| 722 | @cindex killing expressions | 688 | @cindex killing expressions |
| 723 | @kindex C-M-k | 689 | @kindex C-M-k |
| 724 | @findex kill-sexp | 690 | @findex kill-sexp |
| 725 | Killing a whole balanced expression can be done with @kbd{C-M-k} | 691 | To kill a whole balanced expression, type @kbd{C-M-k} |
| 726 | (@code{kill-sexp}). @kbd{C-M-k} kills the characters that @kbd{C-M-f} | 692 | (@code{kill-sexp}). This kills the text that @kbd{C-M-f} would move |
| 727 | would move over. | 693 | over. |
| 728 | 694 | ||
| 729 | @cindex transposition of expressions | 695 | @cindex transposition of expressions |
| 730 | @kindex C-M-t | 696 | @kindex C-M-t |
| 731 | @findex transpose-sexps | 697 | @findex transpose-sexps |
| 732 | A somewhat random-sounding command which is nevertheless handy is | 698 | @kbd{C-M-t} (@code{transpose-sexps}) switches the positions of the |
| 733 | @kbd{C-M-t} (@code{transpose-sexps}), which drags the previous | 699 | previous balanced expression and the next one. It is analogous to the |
| 734 | balanced expression across the next one. An argument serves as a | 700 | @kbd{C-t} command, which transposes characters (@pxref{Transpose}). |
| 735 | repeat count, moving the previous expression over that many following | 701 | An argument to @kbd{C-M-t} serves as a repeat count, moving the |
| 736 | ones. A negative argument drags the previous balanced expression | 702 | previous expression over that many following ones. A negative |
| 737 | backwards across those before it (thus canceling out the effect of | 703 | argument moves the previous balanced expression backwards across those |
| 738 | @kbd{C-M-t} with a positive argument). An argument of zero, rather | 704 | before it. An argument of zero, rather than doing nothing, transposes |
| 739 | than doing nothing, transposes the balanced expressions ending at or | 705 | the balanced expressions ending at or after point and the mark. |
| 740 | after point and the mark. | ||
| 741 | 706 | ||
| 742 | @kindex C-M-@@ | 707 | @kindex C-M-@@ |
| 743 | @kindex C-M-@key{SPC} | 708 | @kindex C-M-@key{SPC} |
| 744 | @findex mark-sexp | 709 | @findex mark-sexp |
| 745 | To operate on balanced expressions with an operation which acts on | 710 | To operate on balanced expressions with a command which acts on the |
| 746 | the region, use the command @kbd{C-M-@key{SPC}} (@code{mark-sexp}). | 711 | region, type @kbd{C-M-@key{SPC}} (@code{mark-sexp}). This sets the |
| 747 | This sets the mark at the same place that @kbd{C-M-f} would move to. | 712 | mark where @kbd{C-M-f} would move to. While the mark is active, each |
| 748 | @xref{Marking Objects}, for more information about this command. | 713 | successive call to this command extends the region by shifting the |
| 749 | 714 | mark by one expression. Positive or negative numeric arguments move | |
| 750 | @kbd{C-M-@key{SPC}} treats | 715 | the mark forward or backward by the specified number of expressions. |
| 751 | numeric arguments in the same way as @kbd{C-M-f}; in particular, a | 716 | The alias @kbd{C-M-@@} is equivalent to @kbd{C-M-@key{SPC}}. |
| 752 | negative argument puts the mark at the beginning of the previous | 717 | @xref{Marking Objects}, for more information about this and related |
| 753 | balanced expression. The alias @kbd{C-M-@@} is equivalent to | 718 | commands. |
| 754 | @kbd{C-M-@key{SPC}}. While the mark is active, each successive use of | ||
| 755 | @kbd{C-M-@key{SPC}} extends the region by shifting the mark by one | ||
| 756 | sexp. | ||
| 757 | 719 | ||
| 758 | In languages that use infix operators, such as C, it is not possible | 720 | In languages that use infix operators, such as C, it is not possible |
| 759 | to recognize all balanced expressions as such because there can be | 721 | to recognize all balanced expressions because there can be multiple |
| 760 | multiple possibilities at a given position. For example, C mode does | 722 | possibilities at a given position. For example, C mode does not treat |
| 761 | not treat @samp{foo + bar} as a single expression, even though it | 723 | @samp{foo + bar} as a single expression, even though it @emph{is} one |
| 762 | @emph{is} one C expression; instead, it recognizes @samp{foo} as one | 724 | C expression; instead, it recognizes @samp{foo} as one expression and |
| 763 | expression and @samp{bar} as another, with the @samp{+} as punctuation | 725 | @samp{bar} as another, with the @samp{+} as punctuation between them. |
| 764 | between them. Both @samp{foo + bar} and @samp{foo} are legitimate | 726 | However, C mode recognizes @samp{(foo + bar)} as a single expression, |
| 765 | choices for ``the expression following point'' when point is at the | 727 | because of the parentheses. |
| 766 | @samp{f}, so the expression commands must perforce choose one or the | ||
| 767 | other to operate on. Note that @samp{(foo + bar)} is recognized as a | ||
| 768 | single expression in C mode, because of the parentheses. | ||
| 769 | 728 | ||
| 770 | @node Moving by Parens | 729 | @node Moving by Parens |
| 771 | @subsection Moving in the Parenthesis Structure | 730 | @subsection Moving in the Parenthesis Structure |
| @@ -776,19 +735,18 @@ single expression in C mode, because of the parentheses. | |||
| 776 | @cindex braces, moving across | 735 | @cindex braces, moving across |
| 777 | @cindex list commands | 736 | @cindex list commands |
| 778 | 737 | ||
| 779 | The Emacs commands for handling parenthetical groupings see nothing | 738 | The following commands move over groupings delimited by parentheses |
| 780 | except parentheses (or whatever characters must balance in the | 739 | (or whatever else serves as delimiters in the language you are working |
| 781 | language you are working with). They ignore strings and comments | 740 | with). They ignore strings and comments, including any parentheses |
| 782 | (including any parentheses within them) and ignore parentheses quoted | 741 | within them, and also ignore parentheses that are ``quoted'' with an |
| 783 | by an escape character. They are mainly intended for editing | 742 | escape character. These commands are mainly intended for editing |
| 784 | programs, but can be useful for editing any text that has parentheses. | 743 | programs, but can be useful for editing any text containing |
| 785 | They are sometimes called ``list'' commands because in Lisp these | 744 | parentheses. They are referred to internally as ``list'' commands |
| 786 | groupings are lists. | 745 | because in Lisp these groupings are lists. |
| 787 | 746 | ||
| 788 | These commands assume that the starting point is not inside a string | 747 | These commands assume that the starting point is not inside a string |
| 789 | or a comment. Sometimes you can invoke them usefully from one of | 748 | or a comment. If you invoke them from inside a string or comment, the |
| 790 | these places (for example, when you have a parenthesised clause in a | 749 | results are unreliable. |
| 791 | comment) but this is unreliable. | ||
| 792 | 750 | ||
| 793 | @table @kbd | 751 | @table @kbd |
| 794 | @item C-M-n | 752 | @item C-M-n |
| @@ -826,52 +784,62 @@ delimiter, this is nearly the same as searching for a @samp{(}. An | |||
| 826 | argument specifies the number of levels to go down. | 784 | argument specifies the number of levels to go down. |
| 827 | 785 | ||
| 828 | @node Matching | 786 | @node Matching |
| 829 | @subsection Automatic Display Of Matching Parentheses | 787 | @subsection Matching Parentheses |
| 830 | @cindex matching parentheses | 788 | @cindex matching parentheses |
| 831 | @cindex parentheses, displaying matches | 789 | @cindex parentheses, displaying matches |
| 832 | 790 | ||
| 833 | The Emacs parenthesis-matching feature is designed to show | 791 | Emacs has a number of @dfn{parenthesis matching} features, which |
| 834 | automatically how parentheses (and other matching delimiters) match in | 792 | make it easy to see how and whether parentheses (or other delimiters) |
| 835 | the text. Whenever you type a self-inserting character that is a | 793 | match up. |
| 836 | closing delimiter, the cursor moves momentarily to the location of the | 794 | |
| 795 | Whenever you type a self-inserting character that is a closing | ||
| 796 | delimiter, the cursor moves momentarily to the location of the | ||
| 837 | matching opening delimiter, provided that is on the screen. If it is | 797 | matching opening delimiter, provided that is on the screen. If it is |
| 838 | not on the screen, Emacs displays some of the text near it in the echo | 798 | not on the screen, Emacs displays some of the text near it in the echo |
| 839 | area. Either way, you can tell which grouping you are closing off. | 799 | area. Either way, you can tell which grouping you are closing off. |
| 840 | 800 | If the opening delimiter and closing delimiter are mismatched---such | |
| 841 | If the opening delimiter and closing delimiter are mismatched---such | ||
| 842 | as in @samp{[x)}---a warning message is displayed in the echo area. | 801 | as in @samp{[x)}---a warning message is displayed in the echo area. |
| 843 | 802 | ||
| 844 | @vindex blink-matching-paren | 803 | @vindex blink-matching-paren |
| 845 | @vindex blink-matching-paren-distance | 804 | @vindex blink-matching-paren-distance |
| 846 | @vindex blink-matching-delay | 805 | @vindex blink-matching-delay |
| 847 | Three variables control parenthesis match display: | 806 | Three variables control the display of matching parentheses: |
| 848 | 807 | ||
| 849 | @code{blink-matching-paren} turns the feature on or off: @code{nil} | 808 | @itemize @bullet |
| 850 | disables it, but the default is @code{t} to enable match display. | 809 | @item |
| 810 | @code{blink-matching-paren} turns the feature on or off: @code{nil} | ||
| 811 | disables it, but the default is @code{t} to enable it. | ||
| 851 | 812 | ||
| 852 | @code{blink-matching-delay} says how many seconds to leave the | 813 | @item |
| 853 | cursor on the matching opening delimiter, before bringing it back to | 814 | @code{blink-matching-delay} says how many seconds to leave the cursor |
| 854 | the real location of point; the default is 1, but on some systems it | 815 | on the matching opening delimiter, before bringing it back to the real |
| 855 | is useful to specify a fraction of a second. | 816 | location of point. This may be an integer or floating-point number; |
| 817 | the default is 1. | ||
| 856 | 818 | ||
| 857 | @code{blink-matching-paren-distance} specifies how many characters | 819 | @item |
| 820 | @code{blink-matching-paren-distance} specifies how many characters | ||
| 858 | back to search to find the matching opening delimiter. If the match | 821 | back to search to find the matching opening delimiter. If the match |
| 859 | is not found in that distance, scanning stops, and nothing is displayed. | 822 | is not found in that distance, Emacs stops scanning and nothing is |
| 860 | This is to prevent the scan for the matching delimiter from wasting | 823 | displayed. The default is 102400. |
| 861 | lots of time when there is no match. The default is 102400. | 824 | @end itemize |
| 862 | 825 | ||
| 863 | @cindex Show Paren mode | 826 | @cindex Show Paren mode |
| 864 | @cindex highlighting matching parentheses | 827 | @cindex highlighting matching parentheses |
| 865 | @findex show-paren-mode | 828 | @findex show-paren-mode |
| 866 | Show Paren mode provides a more powerful kind of automatic matching. | 829 | Show Paren mode, a global minor mode, provides a more powerful kind |
| 867 | Whenever point is before an opening delimiter or after a closing | 830 | of automatic matching. Whenever point is before an opening delimiter |
| 868 | delimiter, both that delimiter and its opposite delimiter are | 831 | or after a closing delimiter, both that delimiter and its opposite |
| 869 | highlighted. Use the command @kbd{M-x show-paren-mode} to enable or | 832 | delimiter are highlighted. To toggle Show Paren mode, type @kbd{M-x |
| 870 | disable this mode. | 833 | show-paren-mode}. |
| 871 | 834 | ||
| 872 | Show Paren mode uses the faces @code{show-paren-match} and | 835 | @cindex Electric Pair mode |
| 873 | @code{show-paren-mismatch} to highlight parentheses; you can customize | 836 | @cindex inserting matching parentheses |
| 874 | them to control how highlighting looks. @xref{Face Customization}. | 837 | @findex electric-pair-mode |
| 838 | Electric Pair mode, a global minor mode, provides a way to easily | ||
| 839 | insert matching delimiters. Whenever you insert an opening delimiter, | ||
| 840 | the matching closing delimiter is automatically inserted as well, | ||
| 841 | leaving point between the two. To toggle Electric Pair mode, type | ||
| 842 | @kbd{M-x electric-pair-mode}. | ||
| 875 | 843 | ||
| 876 | @node Comments | 844 | @node Comments |
| 877 | @section Manipulating Comments | 845 | @section Manipulating Comments |
| @@ -1220,8 +1188,13 @@ pops up a window with possible candidates asking you to choose one of | |||
| 1220 | them. | 1188 | them. |
| 1221 | 1189 | ||
| 1222 | For more information about setting up and using @kbd{M-x woman}, see | 1190 | For more information about setting up and using @kbd{M-x woman}, see |
| 1223 | @ref{Top, WoMan, Browse UN*X Manual Pages WithOut Man, woman, The WoMan | 1191 | @ifinfo |
| 1224 | Manual}. | 1192 | @ref{Top, WoMan, Browse UN*X Manual Pages WithOut Man, woman, The |
| 1193 | WoMan Manual}. | ||
| 1194 | @end ifinfo | ||
| 1195 | @ifnotinfo | ||
| 1196 | the WoMan Info manual, which is distributed with Emacs. | ||
| 1197 | @end ifnotinfo | ||
| 1225 | 1198 | ||
| 1226 | @node Lisp Doc | 1199 | @node Lisp Doc |
| 1227 | @subsection Emacs Lisp Documentation Lookup | 1200 | @subsection Emacs Lisp Documentation Lookup |
| @@ -1400,13 +1373,12 @@ to use Glasses mode. | |||
| 1400 | 1373 | ||
| 1401 | Semantic is a package that provides language-aware editing commands | 1374 | Semantic is a package that provides language-aware editing commands |
| 1402 | based on @code{source code parsers}. This section provides a brief | 1375 | based on @code{source code parsers}. This section provides a brief |
| 1403 | description of Semantic; | 1376 | description of Semantic; for full details, |
| 1404 | @ifnottex | 1377 | @ifnottex |
| 1405 | for full details, see @ref{Top, Semantic,, semantic, Semantic}. | 1378 | see @ref{Top, Semantic,, semantic, Semantic}. |
| 1406 | @end ifnottex | 1379 | @end ifnottex |
| 1407 | @iftex | 1380 | @iftex |
| 1408 | for full details, type @kbd{C-h i} (@code{info}) and then select the | 1381 | see the Semantic Info manual, which is distributed with Emacs. |
| 1409 | Semantic manual. | ||
| 1410 | @end iftex | 1382 | @end iftex |
| 1411 | 1383 | ||
| 1412 | Most of the ``language aware'' features in Emacs, such as font lock | 1384 | Most of the ``language aware'' features in Emacs, such as font lock |
| @@ -1486,8 +1458,10 @@ Programming modes often support Outline minor mode (@pxref{Outline | |||
| 1486 | Mode}). The Foldout package provides folding-editor features | 1458 | Mode}). The Foldout package provides folding-editor features |
| 1487 | (@pxref{Foldout}). | 1459 | (@pxref{Foldout}). |
| 1488 | 1460 | ||
| 1461 | @ifinfo | ||
| 1489 | The ``automatic typing'' features may be useful for writing programs. | 1462 | The ``automatic typing'' features may be useful for writing programs. |
| 1490 | @xref{Top,,Autotyping, autotype, Autotyping}. | 1463 | @xref{Top,,Autotyping, autotype, Autotyping}. |
| 1464 | @end ifinfo | ||
| 1491 | 1465 | ||
| 1492 | @node C Modes | 1466 | @node C Modes |
| 1493 | @section C and Related Modes | 1467 | @section C and Related Modes |
| @@ -1509,9 +1483,14 @@ Mode}). The Foldout package provides folding-editor features | |||
| 1509 | 1483 | ||
| 1510 | This section gives a brief description of the special features | 1484 | This section gives a brief description of the special features |
| 1511 | available in C, C++, Objective-C, Java, CORBA IDL, Pike and AWK modes. | 1485 | available in C, C++, Objective-C, Java, CORBA IDL, Pike and AWK modes. |
| 1512 | (These are called ``C mode and related modes.'') @xref{Top, , CC Mode, | 1486 | (These are called ``C mode and related modes.'') |
| 1513 | ccmode, CC Mode}, for a more extensive description of these modes | 1487 | @ifinfo |
| 1514 | and their special features. | 1488 | @xref{Top,, CC Mode, ccmode, CC Mode}, for more details. |
| 1489 | @end ifinfo | ||
| 1490 | @ifnotinfo | ||
| 1491 | For more details, see the CC mode Info manual, which is distributed | ||
| 1492 | with Emacs. | ||
| 1493 | @end ifnotinfo | ||
| 1515 | 1494 | ||
| 1516 | @menu | 1495 | @menu |
| 1517 | * Motion in C:: Commands to move by C statements, etc. | 1496 | * Motion in C:: Commands to move by C statements, etc. |
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index 0df4a3a7bb5..d05af468fa1 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi | |||
| @@ -1340,17 +1340,18 @@ included in GNU mailutils (the ``mailutils version,'' | |||
| 1340 | command line syntax and the same basic subset of options. However, the | 1340 | command line syntax and the same basic subset of options. However, the |
| 1341 | Mailutils version offers additional features. | 1341 | Mailutils version offers additional features. |
| 1342 | 1342 | ||
| 1343 | The Emacs version of @code{movemail} is able to retrieve mail from the | 1343 | The Emacs version of @code{movemail} is able to retrieve mail from |
| 1344 | usual UNIX mailbox formats and from remote mailboxes using the POP3 | 1344 | the usual Unix mailbox formats and from remote mailboxes using the |
| 1345 | protocol. | 1345 | POP3 protocol. |
| 1346 | 1346 | ||
| 1347 | The Mailutils version is able to handle a wide set of mailbox | 1347 | The Mailutils version is able to handle a wide set of mailbox |
| 1348 | formats, such as plain UNIX mailboxes, @code{maildir} and @code{MH} | 1348 | formats, such as plain Unix mailboxes, @code{maildir} and @code{MH} |
| 1349 | mailboxes, etc. It is able to access remote mailboxes using the POP3 or | 1349 | mailboxes, etc. It is able to access remote mailboxes using the POP3 |
| 1350 | IMAP4 protocol, and can retrieve mail from them using a TLS encrypted | 1350 | or IMAP4 protocol, and can retrieve mail from them using a TLS |
| 1351 | channel. It also accepts mailbox arguments in @acronym{URL} form. | 1351 | encrypted channel. It also accepts mailbox arguments in @acronym{URL} |
| 1352 | The detailed description of mailbox @acronym{URL}s can be found in | 1352 | form. The detailed description of mailbox @acronym{URL}s can be found |
| 1353 | @ref{URL,,,mailutils,Mailbox URL Formats}. In short, a @acronym{URL} is: | 1353 | in @ref{URL,,,mailutils,Mailbox URL Formats}. In short, a |
| 1354 | @acronym{URL} is: | ||
| 1354 | 1355 | ||
| 1355 | @smallexample | 1356 | @smallexample |
| 1356 | @var{proto}://[@var{user}[:@var{password}]@@]@var{host-or-file-name} | 1357 | @var{proto}://[@var{user}[:@var{password}]@@]@var{host-or-file-name} |
| @@ -1381,9 +1382,9 @@ local mailbox. | |||
| 1381 | 1382 | ||
| 1382 | @table @code | 1383 | @table @code |
| 1383 | @item mbox | 1384 | @item mbox |
| 1384 | Usual UNIX mailbox format. In this case, neither @var{user} nor | 1385 | Usual Unix mailbox format. In this case, neither @var{user} nor |
| 1385 | @var{pass} are used, and @var{host-or-file-name} denotes the file name of | 1386 | @var{pass} are used, and @var{host-or-file-name} denotes the file name |
| 1386 | the mailbox file, e.g., @code{mbox://var/spool/mail/smith}. | 1387 | of the mailbox file, e.g., @code{mbox://var/spool/mail/smith}. |
| 1387 | 1388 | ||
| 1388 | @item mh | 1389 | @item mh |
| 1389 | A local mailbox in the @acronym{MH} format. @var{User} and | 1390 | A local mailbox in the @acronym{MH} format. @var{User} and |
| @@ -1524,7 +1525,7 @@ use it, add the @samp{--tls} flag to @code{rmail-movemail-flags}. | |||
| 1524 | @section Retrieving Mail from Local Mailboxes in Various Formats | 1525 | @section Retrieving Mail from Local Mailboxes in Various Formats |
| 1525 | 1526 | ||
| 1526 | If your incoming mail is stored on a local machine in a format other | 1527 | If your incoming mail is stored on a local machine in a format other |
| 1527 | than UNIX mailbox, you will need the Mailutils @code{movemail} to | 1528 | than Unix mailbox, you will need the Mailutils @code{movemail} to |
| 1528 | retrieve it. @xref{Movemail}, for the detailed description of | 1529 | retrieve it. @xref{Movemail}, for the detailed description of |
| 1529 | @code{movemail} versions. For example, to access mail from a inbox in | 1530 | @code{movemail} versions. For example, to access mail from a inbox in |
| 1530 | @code{maildir} format located in @file{/var/spool/mail/in}, you would | 1531 | @code{maildir} format located in @file{/var/spool/mail/in}, you would |
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 72b793246f1..c27a2c2936d 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi | |||
| @@ -32,9 +32,14 @@ structure. | |||
| 32 | @findex nxml-mode | 32 | @findex nxml-mode |
| 33 | Emacs has other major modes for text which contains ``embedded'' | 33 | Emacs has other major modes for text which contains ``embedded'' |
| 34 | commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML and | 34 | commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML and |
| 35 | SGML (@pxref{HTML Mode}); XML (@pxref{Top,The nXML Mode | 35 | SGML (@pxref{HTML Mode}); XML |
| 36 | Manual,,nxml-mode, nXML Mode}); and Groff and Nroff (@pxref{Nroff | 36 | @ifinfo |
| 37 | Mode}). | 37 | (@pxref{Top,The nXML Mode Manual,,nxml-mode, nXML Mode}); |
| 38 | @end ifinfo | ||
| 39 | @ifnotinfo | ||
| 40 | (see the nXML mode Info manual, which is distributed with Emacs); | ||
| 41 | @end ifnotinfo | ||
| 42 | and Groff and Nroff (@pxref{Nroff Mode}). | ||
| 38 | 43 | ||
| 39 | @cindex ASCII art | 44 | @cindex ASCII art |
| 40 | If you need to edit pictures made out of text characters (commonly | 45 | If you need to edit pictures made out of text characters (commonly |
| @@ -1764,8 +1769,15 @@ xml-mode}. Emacs uses nXML mode for files which have the extension | |||
| 1764 | @file{.xml}. For XHTML files, which have the extension @file{.xhtml}, | 1769 | @file{.xml}. For XHTML files, which have the extension @file{.xhtml}, |
| 1765 | Emacs uses HTML mode by default; you can make it use nXML mode by | 1770 | Emacs uses HTML mode by default; you can make it use nXML mode by |
| 1766 | customizing the variable @code{auto-mode-alist} (@pxref{Choosing | 1771 | customizing the variable @code{auto-mode-alist} (@pxref{Choosing |
| 1767 | Modes}). nXML mode is described in its own manual: @xref{Top, nXML | 1772 | Modes}). |
| 1773 | @ifinfo | ||
| 1774 | nXML mode is described in its own manual: @xref{Top, nXML | ||
| 1768 | Mode,,nxml-mode, nXML Mode}. | 1775 | Mode,,nxml-mode, nXML Mode}. |
| 1776 | @end ifinfo | ||
| 1777 | @ifnotinfo | ||
| 1778 | nXML mode is described in an Info manual, which is distributed with | ||
| 1779 | Emacs. | ||
| 1780 | @end ifnotinfo | ||
| 1769 | 1781 | ||
| 1770 | @vindex sgml-xml-mode | 1782 | @vindex sgml-xml-mode |
| 1771 | You may choose to use the less powerful SGML mode for editing XML, | 1783 | You may choose to use the less powerful SGML mode for editing XML, |