From 71d23f9503b2a632fc20299751bf0486131e15c9 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 28 Nov 2015 15:24:28 +0200 Subject: [PATCH] Document 'comment-line' * doc/emacs/programs.texi (Comment Commands): Document 'comment-line'. * etc/NEWS: Move the entry for 'comment-line' into "Editing Changes". --- doc/emacs/programs.texi | 14 ++++++++++++++ etc/NEWS | 5 +++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 1f2c8b1e1c2..f9d9a27e8e2 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -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 diff --git a/etc/NEWS b/etc/NEWS index 4e06e31c1b4..c783ec18f36 100644 --- 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: ‐ ‑ ‒ – — ― ‘ ’ “ ” † ‡ • ′ ″ -- 2.39.5