emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 66b8dfd: ; Fix last change related to shorthands


From: Eli Zaretskii
Subject: emacs-28 66b8dfd: ; Fix last change related to shorthands
Date: Tue, 12 Oct 2021 09:21:24 -0400 (EDT)

branch: emacs-28
commit 66b8dfd0602c2175a0296ce6a844d77c94813429
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; 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.
---
 doc/lispref/symbols.texi | 13 ++++++-------
 src/lread.c              | 11 ++++++-----
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi
index ed7dce1..32590d4 100644
--- a/doc/lispref/symbols.texi
+++ b/doc/lispref/symbols.texi
@@ -742,13 +742,12 @@ There are two exceptions to rules governing Shorthand 
transformations:
 
 @itemize @bullet
 @item
-Symbol forms comprised entirely of symbol constituents (@pxref{Syntax
-Class Table}) are exempt not transform.  For example, it's possible to
-use @code{-} or @code{/=} as shorthand prefixes, but that won't shadow
-the arithmetic @emph{functions} that have exactly that prefix as their
-full name.;
+Symbol forms comprised entirely of symbol and punctuation characters
+(@pxref{Syntax Class Table}) are not transformed.  For example,
+it's possible to use @code{-} or @code{/=} as shorthand prefixes, but
+that won't shadow the arithmetic @emph{functions} of those names.
 
 @item
-Symbol forms whose name starts with the the characters @code{#_} are
-also exempted.
+Symbol forms whose names start with @samp{#} or @samp{_} are not
+transformed.
 @end itemize
diff --git a/src/lread.c b/src/lread.c
index 128b46a..b3f9e6f 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3805,12 +3805,13 @@ read1 (Lisp_Object readcharfun, int *pch, bool 
first_in_list)
              ptrdiff_t longhand_bytes = 0;
 
              Lisp_Object tem;
-             if (skip_shorthand ||
+             if (skip_shorthand
                  /* The following ASCII characters are used in the
-                    only "core" Emacs Lisp symbols that are
-                    exclusively comprised of 'symbol constituent'
-                    syntax. */
-                 strspn(read_buffer, "^*+-/<=>_|") >= nbytes)
+                    only "core" Emacs Lisp symbols that are comprised
+                    entirely of characters that have the 'symbol
+                    constituent' syntax.  We exempt them from
+                    transforming according to shorthands.  */
+                 || strspn (read_buffer, "^*+-/<=>_|") >= nbytes)
                tem = oblookup (obarray, read_buffer, nchars, nbytes);
              else
                tem = oblookup_considering_shorthand (obarray, read_buffer,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]