main: interpret only a double slash (//) as quoting, not a single one
Otherwise the first line of a multiline /*...*/-comment would be seen as quoted and thus *not* as the first line of a paragraph. In the code, use "/{2}" to prevent the remainder of the line getting colored as a comment.master
parent
ad5d0f7530
commit
856322b01e
|
@ -125,7 +125,7 @@ and place it at that position again upon reopening such a file.
|
||||||
.BR "\-Q ""\fIregex\fB""" ", " "\-\-quotestr=""" \fIregex """
|
.BR "\-Q ""\fIregex\fB""" ", " "\-\-quotestr=""" \fIregex """
|
||||||
Set the regular expression for matching the quoting part of a line.
|
Set the regular expression for matching the quoting part of a line.
|
||||||
This is used when justifying.
|
This is used when justifying.
|
||||||
The default value is \fB"^([\ \\t]*[#/:>|}])+"\fP.
|
The default value is \fB"^([\ \\t]*([#:>|}]|//))+"\fP.
|
||||||
Note that \fB\\t\fP stands for an actual Tab.
|
Note that \fB\\t\fP stands for an actual Tab.
|
||||||
.TP
|
.TP
|
||||||
.BR \-R ", " \-\-restricted
|
.BR \-R ", " \-\-restricted
|
||||||
|
|
|
@ -221,7 +221,7 @@ and place it at that position again upon reopening such a file.
|
||||||
@item -Q "@var{regex}"
|
@item -Q "@var{regex}"
|
||||||
@itemx --quotestr="@var{regex}"
|
@itemx --quotestr="@var{regex}"
|
||||||
Set the regular expression for matching the quoting part of a line, used
|
Set the regular expression for matching the quoting part of a line, used
|
||||||
when justifying. The default value is @t{"^([@w{ }\t]*[#/:>|@}])+"}.
|
when justifying. The default value is @t{"^([@w{ }\t]*([#:>|@}]|//))+"}.
|
||||||
Note that @code{\t} stands for a literal Tab character.
|
Note that @code{\t} stands for a literal Tab character.
|
||||||
|
|
||||||
@item -R
|
@item -R
|
||||||
|
@ -851,7 +851,7 @@ Obsolete option. Recognized but ignored.
|
||||||
@item set quotestr "@var{regex}"
|
@item set quotestr "@var{regex}"
|
||||||
The email-quote string, used to justify email-quoted paragraphs. This
|
The email-quote string, used to justify email-quoted paragraphs. This
|
||||||
is an extended regular expression. The default value is
|
is an extended regular expression. The default value is
|
||||||
@t{"^([@w{ }\t]*[#/:>|@}])+"}.
|
@t{"^([@w{ }\t]*([#:>|@}]|//))+"}.
|
||||||
Note that @code{\t} stands for a literal Tab character.
|
Note that @code{\t} stands for a literal Tab character.
|
||||||
|
|
||||||
@item set rebinddelete
|
@item set rebinddelete
|
||||||
|
|
|
@ -206,7 +206,7 @@ Obsolete option. Recognized but ignored.
|
||||||
.B set quotestr "\fIregex\fP"
|
.B set quotestr "\fIregex\fP"
|
||||||
The email-quote string, used to justify email-quoted paragraphs. This
|
The email-quote string, used to justify email-quoted paragraphs. This
|
||||||
is an extended regular expression. The default value is
|
is an extended regular expression. The default value is
|
||||||
"\fB^([\ \\t]*[#/:>|}])+\fP". Note that \fB\\t\fR stands for an actual
|
"\fB^([\ \\t]*([#:>|}]|//))+\fP". Note that \fB\\t\fR stands for an actual
|
||||||
Tab character.
|
Tab character.
|
||||||
.TP
|
.TP
|
||||||
.B set rebinddelete
|
.B set rebinddelete
|
||||||
|
|
|
@ -128,7 +128,7 @@
|
||||||
|
|
||||||
## The email-quote string, used to justify email-quoted paragraphs.
|
## The email-quote string, used to justify email-quoted paragraphs.
|
||||||
## This is an extended regular expression. The default is:
|
## This is an extended regular expression. The default is:
|
||||||
# set quotestr "^([ ]*[#/:>|}])+"
|
# set quotestr "^([ ]*([#:>|}]|//))+"
|
||||||
|
|
||||||
## Fix Backspace/Delete confusion problem.
|
## Fix Backspace/Delete confusion problem.
|
||||||
# set rebinddelete
|
# set rebinddelete
|
||||||
|
|
|
@ -2470,7 +2470,7 @@ int main(int argc, char **argv)
|
||||||
if (brackets == NULL)
|
if (brackets == NULL)
|
||||||
brackets = mallocstrcpy(NULL, "\"')>]}");
|
brackets = mallocstrcpy(NULL, "\"')>]}");
|
||||||
if (quotestr == NULL)
|
if (quotestr == NULL)
|
||||||
quotestr = mallocstrcpy(NULL, "^([ \t]*[#/:>|}])+");
|
quotestr = mallocstrcpy(NULL, "^([ \t]*([#:>|}]|/{2}))+");
|
||||||
|
|
||||||
/* Compile the quoting regex, and free it when it's good; otherwise,
|
/* Compile the quoting regex, and free it when it's good; otherwise,
|
||||||
* retrieve and store the error message, to be shown when justifying. */
|
* retrieve and store the error message, to be shown when justifying. */
|
||||||
|
|
Loading…
Reference in New Issue