aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-11-28 15:24:28 +0200
committerEli Zaretskii2015-11-28 15:24:28 +0200
commit71d23f9503b2a632fc20299751bf0486131e15c9 (patch)
tree985c99fc072727009c9f4839f44bd15b4ebf0d82
parentd4ade2c8fac7d0279a62c71f5a29835b986581e0 (diff)
downloademacs-71d23f9503b2a632fc20299751bf0486131e15c9.tar.gz
emacs-71d23f9503b2a632fc20299751bf0486131e15c9.zip
Document 'comment-line'
* doc/emacs/programs.texi (Comment Commands): Document 'comment-line'. * etc/NEWS: Move the entry for 'comment-line' into "Editing Changes".
-rw-r--r--doc/emacs/programs.texi14
-rw-r--r--etc/NEWS5
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.
917@item @kbd{M-;} 917@item @kbd{M-;}
918Insert or realign comment on current line; if the region is active, 918Insert or realign comment on current line; if the region is active,
919comment or uncomment the region instead (@code{comment-dwim}). 919comment or uncomment the region instead (@code{comment-dwim}).
920@item @kbd{C-x C-;}
921Comment or uncomment the current line (@code{comment-line}).
920@item @kbd{C-u M-;} 922@item @kbd{C-u M-;}
921Kill comment on current line (@code{comment-kill}). 923Kill comment on current line (@code{comment-kill}).
922@item @kbd{C-x ;} 924@item @kbd{C-x ;}
@@ -971,6 +973,18 @@ are not moved. Even when an existing comment is properly aligned,
971@kbd{M-;} is still useful for moving directly to the start of the 973@kbd{M-;} is still useful for moving directly to the start of the
972comment text. 974comment text.
973 975
976@findex comment-line
977@kindex C-x C-;
978 @kbd{C-x C-;} (@code{comment-line}) comments or uncomments complete
979lines. When a region is active (@pxref{Mark}), @kbd{C-x C-;} either
980comments or uncomments the lines in the region. If the region is not
981active, this command comments or uncomments the line point is on.
982With a positive prefix argument @var{n}, it operates on @var{n} lines
983starting with the current one; with a negative @var{n}, it affects
984@var{n} preceding lines. After invoking this command with a negative
985argument, successive invocations with a positive argument will operate
986on preceding lines as if the argument were negated.
987
974@findex comment-kill 988@findex comment-kill
975@kindex C-u M-; 989@kindex C-u M-;
976 @kbd{C-u M-;} (@code{comment-dwim} with a prefix argument) kills any 990 @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.
135Works for functions, variables, faces, etc. It is bound to `C-h o' by 135Works for functions, variables, faces, etc. It is bound to `C-h o' by
136default. 136default.
137 137
138** New command `comment-line' bound to `C-x C-;'.
139
140** New function `custom-prompt-customize-unsaved-options' checks for 138** New function `custom-prompt-customize-unsaved-options' checks for
141unsaved customizations and prompts user to customize (if found). 139unsaved customizations and prompts user to customize (if found).
142 140
@@ -318,6 +316,9 @@ at configure time.
318** Successive single-char deletions are collapsed in the undo-log just like 316** Successive single-char deletions are collapsed in the undo-log just like
319successive char insertions. 317successive char insertions.
320 318
319+++
320** New command `comment-line' bound to `C-x C-;'.
321
321** Unicode names entered via C-x 8 RET now use substring completion by default. 322** Unicode names entered via C-x 8 RET now use substring completion by default.
322 323
323** C-x 8 now has shorthands for these chars: ‐ ‑ ‒ – — ― ‘ ’ “ ” † ‡ • ′ ″ 324** C-x 8 now has shorthands for these chars: ‐ ‑ ‒ – — ― ‘ ’ “ ” † ‡ • ′ ″