diff options
| author | Alan Mackenzie | 2016-03-10 11:42:32 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2016-03-10 11:42:32 +0000 |
| commit | f7adb8a4efa6b95d63433728c1dd0353cde6a2e4 (patch) | |
| tree | b2da497092d9e6756727fce7077ab84669129b83 | |
| parent | 80864c2a04597d31ba453c9af69d35b15c4e1e24 (diff) | |
| download | emacs-f7adb8a4efa6b95d63433728c1dd0353cde6a2e4.tar.gz emacs-f7adb8a4efa6b95d63433728c1dd0353cde6a2e4.zip | |
Clarify the documentation of nested comments.
* doc/lispref/syntax.texi (Syntax Flags): State that only comments of the same
style are recognized inside nestable comments.
(Low-Level Parsing): Clarify that parsing will stop after the start or end of
UNNESTED comments.
| -rw-r--r-- | doc/lispref/syntax.texi | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi index 19782d0fbde..d5a7eba13fe 100644 --- a/doc/lispref/syntax.texi +++ b/doc/lispref/syntax.texi | |||
| @@ -331,10 +331,10 @@ alternative ``c'' comment style. For a two-character comment | |||
| 331 | delimiter, @samp{c} on either character makes it of style ``c''. | 331 | delimiter, @samp{c} on either character makes it of style ``c''. |
| 332 | 332 | ||
| 333 | @item | 333 | @item |
| 334 | @samp{n} on a comment delimiter character specifies | 334 | @samp{n} on a comment delimiter character specifies that this kind of |
| 335 | that this kind of comment can be nested. For a two-character | 335 | comment can be nested. Inside such a comment, only comments of the |
| 336 | comment delimiter, @samp{n} on either character makes it | 336 | same style will be recognized. For a two-character comment delimiter, |
| 337 | nestable. | 337 | @samp{n} on either character makes it nestable. |
| 338 | 338 | ||
| 339 | @cindex comment style | 339 | @cindex comment style |
| 340 | Emacs supports several comment styles simultaneously in any one syntax | 340 | Emacs supports several comment styles simultaneously in any one syntax |
| @@ -899,9 +899,10 @@ The depth starts at 0, or at whatever is given in @var{state}. | |||
| 899 | If the fourth argument @var{stop-before} is non-@code{nil}, parsing | 899 | If the fourth argument @var{stop-before} is non-@code{nil}, parsing |
| 900 | stops when it comes to any character that starts a sexp. If | 900 | stops when it comes to any character that starts a sexp. If |
| 901 | @var{stop-comment} is non-@code{nil}, parsing stops when it comes to the | 901 | @var{stop-comment} is non-@code{nil}, parsing stops when it comes to the |
| 902 | start of a comment. If @var{stop-comment} is the symbol | 902 | start of an unnested comment. If @var{stop-comment} is the symbol |
| 903 | @code{syntax-table}, parsing stops after the start of a comment or a | 903 | @code{syntax-table}, parsing stops after the start of an unnested |
| 904 | string, or the end of a comment or a string, whichever comes first. | 904 | comment or a string, or the end of an unnested comment or a string, |
| 905 | whichever comes first. | ||
| 905 | 906 | ||
| 906 | If @var{state} is @code{nil}, @var{start} is assumed to be at the top | 907 | If @var{state} is @code{nil}, @var{start} is assumed to be at the top |
| 907 | level of parenthesis structure, such as the beginning of a function | 908 | level of parenthesis structure, such as the beginning of a function |