[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) should
From: |
João Távora |
Subject: |
bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol |
Date: |
Mon, 11 Oct 2021 22:36:14 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) |
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.
Closing this bug. Let me know if I should reopen.
João
- 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, 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, 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 <=
- bug#51089: 28.0.60; Using read-symbol-shorthands (("-" . "foo-")) shouldn't shadow the '-' symbol, Eli Zaretskii, 2021/10/12