[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) should
From: |
Eli Zaretskii |
Subject: |
bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol |
Date: |
Tue, 12 Oct 2021 16:22:11 +0300 |
> From: João Távora <joaotavora@gmail.com>
> Cc: 51089-done@debbugs.gnu.org, Richard Stallman <rms@gnu.org>
> Date: Mon, 11 Oct 2021 22:36:14 +0100
>
> João Távora <joaotavora@gmail.com> writes:
> >> Yes. But I think we could use strcspn for an easier, one-line, test
> >> of the same.
> > Seems I didn't try very hard :-) Using strspn() instead of strcpsn() does
> > work. Patch below, with a constant string of ASCII punctuation that
> > you'll probably want to tweak.
>
> Hello Eli,
>
> I took the initiative and pushed the patch to emacs-28 after settling on
> the string:
>
> "^*+-/<=>_|"
>
> I chose this string after analysing the Emacs Lisp symbols that are only
> punctuation. I used this Elisp form (very inneficient, but did the job).
>
> (let ((all-punctuation))
> (mapatoms (lambda (symbol)
> (when (with-temp-buffer
> (insert (symbol-name symbol))
> (goto-char (point-min))
> (skip-syntax-forward "_")
> (eobp))
> (push symbol all-punctuation))))
> all-punctuation)
>
> This returns the following symbols, which I think is the full set of
> "protected" ones:
>
> ;; => (& * + - / < = > _ | ** ++ -- -/ -> /= <= <> >= || ¬ --- --> ->>)
>
> One of them isn't ASCII, but as we discussed it's likely not used a
> shorthand prefix.
Thanks, looks okay to me (modulo some minor changes in wording of
comments and documentation).
- bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol, (continued)
- bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol, Eli Zaretskii, 2021/10/08
- bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol, João Távora, 2021/10/08
- bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol, Eli Zaretskii, 2021/10/08
- bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol, Eli Zaretskii, 2021/10/08
- bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol, João Távora, 2021/10/09
- bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol, Eli Zaretskii, 2021/10/09
- bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol, João Távora, 2021/10/10
- bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol, João Távora, 2021/10/10
- bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol, João Távora, 2021/10/10
- bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol, João Távora, 2021/10/11
- bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol,
Eli Zaretskii <=