[m-rev.] for post-commit review: ('x')

Peter Wang novalazy at gmail.com
Mon Dec 7 15:09:06 AEDT 2020

On Sun, 06 Dec 2020 15:34:38 +1100 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> This addresses an issue raised on m-users. For review by anyone.
> Zoltan.

> diff --git a/doc/reference_manual.texi b/doc/reference_manual.texi
> index 551908334..b45919cd3 100644
> --- a/doc/reference_manual.texi
> +++ b/doc/reference_manual.texi
> @@ -291,6 +291,10 @@ over more than one source line.
>  (String literals may also contain embedded newlines.)
>  @item name
> + at c In these paragraphs, we use @code instead of @samp
> + at c to wrap examples, because @samp puts quotes around its argument,
> + at c and we cannot expect readers to figure out which quotes
> + at c are subject matter and which are decoration.

(@code does not add quotes in non-Info output,
but both @samp and @code will add quotes in Info output.)

> @@ -301,6 +305,16 @@ two adjacent single quotes stand for a single single quote.
>  Quoted names can also contain
>  backslash escapes of the same form as for strings.
> +Note that if a character is an operator,
> +then the result of enclosing that character in single quotes
> +is also an operator.
> +Since e.g. @code{:} is an operator,
> + at code{':'} is an operator as well,
> +which means that e.g. @code{Char = ':'} is not valid code.
> +To make it valid code, you need to put parentheses around the operator,
> +to prevent the scope of the operator from extending to the surrounding code.
> +This means that code such as @code{Char = (':')} is valid.
> +

That's fine.

Should we also add this to the Data-functors section?


diff --git a/doc/reference_manual.texi b/doc/reference_manual.texi
index c02a8de34..94d00c78f 100644
--- a/doc/reference_manual.texi
+++ b/doc/reference_manual.texi
@@ -1644,8 +1644,15 @@ or an explicit type qualification.
 @subsection Data-functors

 A data-functor is an integer, a float, a string,
-a character literal (any single-character name),
 a name, an implementation-defined literal, or a compound data-term.
+Character literals are written as single-character names,
+quoted or unquoted.
+If the character is an operator,
+it will be necessary to enclose the name within parentheses
+in some contexts,
+e.g.@: @code{(':')}.
 A compound data-term is a compound term
 which does not match the form of a special data-term (@pxref{Data-terms}),
 and whose arguments are data-terms.

More information about the reviews mailing list