; Fix last change related to shorthands

* src/lread.c (read1): Minor stylistic fixes of the last change,
including the wording of the comment.

* doc/lispref/symbols.texi (Shorthands): Fix wording and typos.
This commit is contained in:
Eli Zaretskii 2021-10-12 16:20:47 +03:00
parent 3832b983cf
commit 66b8dfd060
2 changed files with 12 additions and 12 deletions

View file

@ -742,13 +742,12 @@ There are two exceptions to rules governing Shorthand transformations:
@itemize @bullet @itemize @bullet
@item @item
Symbol forms comprised entirely of symbol constituents (@pxref{Syntax Symbol forms comprised entirely of symbol and punctuation characters
Class Table}) are exempt not transform. For example, it's possible to (@pxref{Syntax Class Table}) are not transformed. For example,
use @code{-} or @code{/=} as shorthand prefixes, but that won't shadow it's possible to use @code{-} or @code{/=} as shorthand prefixes, but
the arithmetic @emph{functions} that have exactly that prefix as their that won't shadow the arithmetic @emph{functions} of those names.
full name.;
@item @item
Symbol forms whose name starts with the the characters @code{#_} are Symbol forms whose names start with @samp{#} or @samp{_} are not
also exempted. transformed.
@end itemize @end itemize

View file

@ -3805,12 +3805,13 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
ptrdiff_t longhand_bytes = 0; ptrdiff_t longhand_bytes = 0;
Lisp_Object tem; Lisp_Object tem;
if (skip_shorthand || if (skip_shorthand
/* The following ASCII characters are used in the /* The following ASCII characters are used in the
only "core" Emacs Lisp symbols that are only "core" Emacs Lisp symbols that are comprised
exclusively comprised of 'symbol constituent' entirely of characters that have the 'symbol
syntax. */ constituent' syntax. We exempt them from
strspn(read_buffer, "^*+-/<=>_|") >= nbytes) transforming according to shorthands. */
|| strspn (read_buffer, "^*+-/<=>_|") >= nbytes)
tem = oblookup (obarray, read_buffer, nchars, nbytes); tem = oblookup (obarray, read_buffer, nchars, nbytes);
else else
tem = oblookup_considering_shorthand (obarray, read_buffer, tem = oblookup_considering_shorthand (obarray, read_buffer,