]> code.delx.au - gnu-emacs/blobdiff - doc/emacs/programs.texi
Update Indentation chapter of Emacs manual.
[gnu-emacs] / doc / emacs / programs.texi
index 72aa8ff121a43769132987bf4a27b6cfe05395c7..675977c2c35e8179fbf0b4fc362abaf9556926c7 100644 (file)
@@ -1,6 +1,5 @@
 @c This is part of the Emacs manual.
-@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1999, 2000,
-@c   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+@c Copyright (C) 1985-1987, 1993-1995, 1997, 1999-2011
 @c   Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node Programs, Building, Text, Top
@@ -34,7 +33,7 @@ Highlight program syntax (@pxref{Font Lock}).
                           of a program.
 * Program Indent::      Adjusting indentation to show the nesting.
 * Parentheses::         Commands that operate on parentheses.
-* Comments::           Inserting, killing, and aligning comments.
+* Comments::            Inserting, killing, and aligning comments.
 * Documentation::       Getting documentation of functions you plan to call.
 * Hideshow::            Displaying blocks selectively.
 * Symbol Completion::   Completion on symbol names of your program or language.
@@ -354,11 +353,11 @@ single line, a specified number of lines, or all of the lines inside a
 single parenthetical grouping.
 
 @menu
-* Basic Indent::       Indenting a single line.
+* Basic Indent::        Indenting a single line.
 * Multi-line Indent::   Commands to reindent many lines at once.
-* Lisp Indent::                Specifying how each Lisp function should be indented.
-* C Indent::           Extra features for indenting C and related modes.
-* Custom C Indent::    Controlling indentation style for C and related modes.
+* Lisp Indent::         Specifying how each Lisp function should be indented.
+* C Indent::            Extra features for indenting C and related modes.
+* Custom C Indent::     Controlling indentation style for C and related modes.
 @end menu
 
 @cindex pretty-printer
@@ -398,7 +397,7 @@ the syntax and conventions for its particular language.
 
   Use @kbd{C-q @key{TAB}} to insert a tab character at point.
 
-@kindex C-j
+@kindex C-j @r{(indenting source code)}
 @findex newline-and-indent
   When entering lines of new code, use @kbd{C-j}
 (@code{newline-and-indent}), which inserts a newline and then adjusts
@@ -463,8 +462,9 @@ etc.  To correct the overall indentation as well, type @key{TAB}
 first.
 
   @kbd{C-M-\} (@code{indent-region}) applies @key{TAB} to the region.
-This is useful when Transient Mark mode is disabled (@pxref{Persistent
-Mark}), because in that case @key{TAB} does not act on the region.
+This is useful when Transient Mark mode is disabled (@pxref{Disabled
+Transient Mark}), because in that case @key{TAB} does not act on the
+region.
 
 @kindex C-u TAB
   If you like the relative indentation within a grouping but not the
@@ -609,7 +609,9 @@ example,
 
 @example
 (setq c-default-style
-      '((java-mode . "java") (awk-mode . "awk") (other . "gnu")))
+      '((java-mode . "java")
+        (awk-mode . "awk")
+        (other . "gnu")))
 @end example
 
 @noindent
@@ -642,8 +644,9 @@ balanced.
   When talking about these facilities, the term ``parenthesis'' also
 includes braces, brackets, or whatever delimiters are defined to match
 in pairs.  The major mode controls which delimiters are significant,
-through the syntax table (@pxref{Syntax}).  In Lisp, only parentheses
-count; in C, these commands apply to braces and brackets too.
+through the syntax table (@pxref{Syntax Tables,, Syntax Tables, elisp,
+The Emacs Lisp Reference Manual}).  In Lisp, only parentheses count;
+in C, these commands apply to braces and brackets too.
 
   You can use @kbd{M-x check-parens} to find any unbalanced
 parentheses and unbalanced string quotes in the buffer.
@@ -652,7 +655,7 @@ parentheses and unbalanced string quotes in the buffer.
 * Expressions::         Expressions with balanced parentheses.
 * Moving by Parens::    Commands for moving up, down and across
                           in the structure of parentheses.
-* Matching::           Insertion of a close-delimiter flashes matching open.
+* Matching::            Insertion of a close-delimiter flashes matching open.
 @end menu
 
 @node Expressions
@@ -739,9 +742,12 @@ after point and the mark.
 @kindex C-M-@@
 @kindex C-M-@key{SPC}
 @findex mark-sexp
-  To set the region around the next balanced expression in the buffer,
-use @kbd{C-M-@key{SPC}} (@code{mark-sexp}), which sets mark at the
-same place that @kbd{C-M-f} would move to.  @kbd{C-M-@key{SPC}} treats
+  To operate on balanced expressions with an operation which acts on
+the region, use the command @kbd{C-M-@key{SPC}} (@code{mark-sexp}).
+This sets the mark at the same place that @kbd{C-M-f} would move to.
+@xref{Marking Objects}, for more information about this command.
+
+@kbd{C-M-@key{SPC}} treats
 numeric arguments in the same way as @kbd{C-M-f}; in particular, a
 negative argument puts the mark at the beginning of the previous
 balanced expression.  The alias @kbd{C-M-@@} is equivalent to
@@ -1202,7 +1208,7 @@ completion based on the list of manual pages that are installed on
 your machine; the list of available manual pages is computed
 automatically the first time you invoke @code{woman}.  The word at
 point in the current buffer is used to suggest the default for the
-name the manual page.
+name of the manual page.
 
   With a numeric argument, @kbd{M-x woman} recomputes the list of the
 manual pages used for completion.  This is useful if you add or delete
@@ -1435,7 +1441,7 @@ parsed, and move point there (@code{semantic-complete-jump}).
 @kindex C-c , @key{SPC}
 Display a list of possible completions for the symbol at point
 (@code{semantic-complete-analyze-inline}).  This also activates a set
-of special keybindings for choosing a completion: @key{RET} accepts
+of special key bindings for choosing a completion: @key{RET} accepts
 the current completion, @kbd{M-n} and @kbd{M-p} cycle through possible
 completions, @key{TAB} completes as far as possible and then cycles,
 and @kbd{C-g} or any other key aborts completion.
@@ -1839,7 +1845,3 @@ starts comments in assembler syntax.
 @ifnottex
 @include fortran-xtra.texi
 @end ifnottex
-
-@ignore
-   arch-tag: c7ee7409-40a4-45c7-bfb7-ae7f2c74d0c0
-@end ignore