From 5b31640cadf1f58d59f34ae9763d7ec3921e225a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 7 Apr 2006 16:52:46 +0000 Subject: [PATCH] (Comments, Comment Commands, Options for Comments, Multi-Line Comments): "Align", not "indent". --- man/ChangeLog | 5 +++++ man/programs.texi | 25 +++++++++++++------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index ad4a78453a5..a7888a682da 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2006-04-07 Richard Stallman + + * programs.texi (Comments, Comment Commands, Options for Comments) + (Multi-Line Comments): "Align", not "indent". + 2006-04-06 Richard Stallman * idlwave.texi: Delete the blocks "not suitable for inclusion with diff --git a/man/programs.texi b/man/programs.texi index 12e594c1868..5cd769446ae 100644 --- a/man/programs.texi +++ b/man/programs.texi @@ -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 -- 2.39.2