]> git.eshelyaron.com Git - emacs.git/commitdiff
Document 'comment-line'
authorEli Zaretskii <eliz@gnu.org>
Sat, 28 Nov 2015 13:24:28 +0000 (15:24 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 28 Nov 2015 13:24:28 +0000 (15:24 +0200)
* doc/emacs/programs.texi (Comment Commands): Document
'comment-line'.

* etc/NEWS: Move the entry for 'comment-line' into "Editing Changes".

doc/emacs/programs.texi
etc/NEWS

index 1f2c8b1e1c2d7cbfedae8dbc0d6bf9cad0f6a89a..f9d9a27e8e2aa2cf0d0fb68a888927d9af311944 100644 (file)
@@ -917,6 +917,8 @@ will indent the comment to the appropriate position.
 @item @kbd{M-;}
 Insert or realign comment on current line; if the region is active,
 comment or uncomment the region instead (@code{comment-dwim}).
+@item @kbd{C-x C-;}
+Comment or uncomment the current line (@code{comment-line}).
 @item @kbd{C-u M-;}
 Kill comment on current line (@code{comment-kill}).
 @item @kbd{C-x ;}
@@ -971,6 +973,18 @@ are not moved.  Even when an existing comment is properly aligned,
 @kbd{M-;} is still useful for moving directly to the start of the
 comment text.
 
+@findex comment-line
+@kindex C-x C-;
+  @kbd{C-x C-;} (@code{comment-line}) comments or uncomments complete
+lines.  When a region is active (@pxref{Mark}), @kbd{C-x C-;} either
+comments or uncomments the lines in the region.  If the region is not
+active, this command comments or uncomments the line point is on.
+With a positive prefix argument @var{n}, it operates on @var{n} lines
+starting with the current one; with a negative @var{n}, it affects
+@var{n} preceding lines.  After invoking this command with a negative
+argument, successive invocations with a positive argument will operate
+on preceding lines as if the argument were negated.
+
 @findex comment-kill
 @kindex C-u M-;
   @kbd{C-u M-;} (@code{comment-dwim} with a prefix argument) kills any
index 4e06e31c1b47b88743893be33d825e98c234c5a6..c783ec18f36e1f1989a39736c026fce7b1826254 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -135,8 +135,6 @@ frames.
 Works for functions, variables, faces, etc.  It is bound to `C-h o' by
 default.
 
-** New command `comment-line' bound to `C-x C-;'.
-
 ** New function `custom-prompt-customize-unsaved-options' checks for
 unsaved customizations and prompts user to customize (if found).
 
@@ -318,6 +316,9 @@ at configure time.
 ** Successive single-char deletions are collapsed in the undo-log just like
 successive char insertions.
 
++++
+** New command `comment-line' bound to `C-x C-;'.
+
 ** Unicode names entered via C-x 8 RET now use substring completion by default.
 
 ** C-x 8 now has shorthands for these chars: ‐ ‑ ‒ – — ― ‘ ’ “ ” † ‡ • ′ ″