]> code.delx.au - gnu-emacs/blobdiff - man/programs.texi
(Program Modes): Replace inforef to emacs-xtra by conditional xref's, depending
[gnu-emacs] / man / programs.texi
index 12e594c1868af758fee99637192fb4686f6f9913..63b694f2709e994ddee2d13bf90560a05bf8f2aa 100644 (file)
@@ -42,6 +42,9 @@ Highlight program syntax (@pxref{Font Lock}).
 * C Modes::             Special commands of C, C++, Objective-C,
                           Java, and Pike modes.
 * Asm Mode::            Asm mode and its special features.
+@ifnottex
+* Fortran::             Fortran mode and its special features.
+@end ifnottex
 @end menu
 
 @node Program Modes
@@ -109,7 +112,14 @@ tab character before point, in these modes.
 Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK
 (@pxref{Top, , CC Mode, ccmode, CC Mode}) and the IDLWAVE modes
 (@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}).  For Fortran
-mode, @inforef{Fortran,, emacs-xtra}.
+mode, see
+@iftex
+@ref{Fortran,,, emacs-xtra}.
+@end iftex
+@ifnottex
+@ref{Fortran}.
+@end ifnottex
+
 
 @cindex mode hook
 @vindex c-mode-hook
@@ -387,9 +397,10 @@ the characters around it.
 @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
-indentation after it.  Thus, @kbd{C-j} at the end of a line creates a
-blank line with appropriate indentation.  In programming language
-modes, it is equivalent to @key{RET} @key{TAB}.
+indentation after it.  (It also deletes any trailing whitespace which
+remains before the new newline.)  Thus, @kbd{C-j} at the end of a line
+creates a blank line with appropriate indentation.  In programming
+language modes, it is equivalent to @key{RET} @key{TAB}.
 
   @key{TAB} indents a line that starts within a parenthetical grouping
 under the preceding line within the grouping, or the text after the
@@ -853,7 +864,7 @@ also do spell checking on comments with Flyspell Prog mode
 (@pxref{Spelling}).
 
 @menu
-* Comment Commands::    Inserting, killing, and indenting comments.
+* Comment Commands::    Inserting, killing, and aligning comments.
 * Multi-Line Comments:: Commands for adding and editing multi-line comments.
 * Options for Comments::Customizing the comment features.
 @end menu
@@ -861,6 +872,7 @@ also do spell checking on comments with Flyspell Prog mode
 @node Comment Commands
 @subsection Comment Commands
 @cindex indentation for comments
+@cindex alignment for comments
 
   The comment commands in this table insert, kill and align comments.
 They are described in this section and following sections.
@@ -899,11 +911,11 @@ away.  If the major mode has specified a string to terminate comments,
 @kbd{M-;} inserts that after point, to keep the syntax valid.
 
   If the text of the line extends past the comment column, this
-command indents the comment start string to a suitable boundary
+command aligns the comment start string to a suitable boundary
 (usually, at least one space is inserted).
 
   You can also use @kbd{M-;} to align an existing comment.  If a line
-already contains the comment-start string, @kbd{M-;} reindents it to
+already contains the comment-start string, @kbd{M-;} realigns it to
 the conventional alignment and moves point after it.  (Exception:
 comments starting in column 0 are not moved.)  Even when an existing
 comment is properly aligned, @kbd{M-;} is still useful for moving
@@ -933,7 +945,7 @@ or else enable Transient Mark mode momentarily (@pxref{Momentary Mark}).
 A prefix argument used in these circumstances specifies how many
 comment delimiters to add or how many to delete.
 
-  Some major modes have special rules for indenting certain kinds of
+  Some major modes have special rules for aligning certain kinds of
 comments in certain contexts.  For example, in Lisp code, comments which
 start with two semicolons are indented as if they were lines of code,
 instead of at the comment column.  Comments which start with three
@@ -984,13 +996,13 @@ commenting them out.  With a negative argument, it does the
 opposite---it deletes comment delimiters from the lines in the region.
 
   With a positive argument, @code{comment-region} duplicates the last
-character of the comment start sequence it adds; the argument specifies
-how many copies of the character to insert.  Thus, in Lisp mode,
-@kbd{C-u 2 M-x comment-region} adds @samp{;;} to each line.  Duplicating
-the comment delimiter is a way of calling attention to the comment.  It
-can also affect how the comment is indented.  In Lisp, for proper
-indentation, you should use an argument of two or three, if between defuns;
-if within a defun, it must be three.
+character of the comment start sequence it adds; the argument
+specifies how many copies of the character to insert.  Thus, in Lisp
+mode, @kbd{C-u 2 M-x comment-region} adds @samp{;;} to each line.
+Duplicating the comment delimiter is a way of calling attention to the
+comment.  It can also affect how the comment is aligned or indented.
+In Lisp, for proper indentation, you should use an argument of two or
+three, if between defuns; if within a defun, it must be three.
 
   You can configure C Mode such that when you type a @samp{/} at the
 start of a line in a multi-line block comment, this closes the
@@ -1060,7 +1072,7 @@ The default for this variable depends on the major mode.
 
 @vindex comment-indent-function
   The variable @code{comment-indent-function} should contain a function
-that will be called to compute the indentation for a newly inserted
+that will be called to compute the alignment for a newly inserted
 comment or for aligning an existing comment.  It is set differently by
 various major modes.  The function is called with no arguments, but with
 point at the beginning of the comment, or at the end of a line if a new
@@ -1740,6 +1752,10 @@ Insert or align a comment.
   The variable @code{asm-comment-char} specifies which character
 starts comments in assembler syntax.
 
+@ifnottex
+@include fortran-xtra.texi
+@end ifnottex
+
 @ignore
    arch-tag: c7ee7409-40a4-45c7-bfb7-ae7f2c74d0c0
 @end ignore