aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorAlan Mackenzie2015-12-28 16:01:05 +0000
committerAlan Mackenzie2015-12-28 16:01:05 +0000
commit326ffcce5fbbb0ca368cfa08a33101dbbcaa2ace (patch)
tree1b86615b5bed5089446aa9c5a8ae0619703aa3b0 /doc
parent17ab0d10e1db9cc4924ceb778e5c4e6bb9a90c3d (diff)
downloademacs-326ffcce5fbbb0ca368cfa08a33101dbbcaa2ace.tar.gz
emacs-326ffcce5fbbb0ca368cfa08a33101dbbcaa2ace.zip
Allow line comments ending with escaped NL to be continued to the next line.
Use this in C, C++, and Objective C Modes. Fixes bug#22246 * src/syntax.c (comment-end-can-be-escaped): New buffer local variable. (forw-comment, back-comment): On encountering an end of comment character, test whether it is escaped when `comment-end-can-be-escaped' is non-nil. * doc/lispref/syntax.texi (Control Parsing): Describe `comment-end-can-be-escaped'. * etc/NEWS (Lisp Changes): Describe `comment-end-can-be-escaped'. * lisp/progmodes/cc-langs.el: New c-lang-setvar `comment-end-can-be-escaped'.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/syntax.texi8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index 7a984e3d87b..831ebd12f55 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -945,6 +945,14 @@ whitespace by the functions in this section and by @code{forward-sexp},
945The behavior of @code{parse-partial-sexp} is also affected by 945The behavior of @code{parse-partial-sexp} is also affected by
946@code{parse-sexp-lookup-properties} (@pxref{Syntax Properties}). 946@code{parse-sexp-lookup-properties} (@pxref{Syntax Properties}).
947 947
948@defvar comment-end-can-be-escaped
949If this buffer local variable is non-@code{nil}, a single character
950which usually terminates a comment doesn't do so when that character
951is escaped. This is used in C and C++ Modes, where line comments
952starting with @samp{//} can be continued onto the next line by
953escaping the newline with @samp{\}.
954@end defvar
955
948You can use @code{forward-comment} to move forward or backward over 956You can use @code{forward-comment} to move forward or backward over
949one comment or several comments. 957one comment or several comments.
950 958