1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00

(Comments, Comment Commands, Options for Comments, Multi-Line Comments):

"Align", not "indent".
This commit is contained in:
Richard M. Stallman 2006-04-07 16:52:46 +00:00
parent 4d91dd05aa
commit 5b31640cad
2 changed files with 18 additions and 12 deletions

View File

@ -1,3 +1,8 @@
2006-04-07 Richard Stallman <rms@gnu.org>
* programs.texi (Comments, Comment Commands, Options for Comments)
(Multi-Line Comments): "Align", not "indent".
2006-04-06 Richard Stallman <rms@gnu.org>
* idlwave.texi: Delete the blocks "not suitable for inclusion with

View File

@ -853,7 +853,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 +861,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 +900,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 +934,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 +985,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 +1061,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