From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs 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 Message-ID: <87pmsb5jn5.fsf@gmail.com> References: <871r4w8sza.fsf@gmail.com> <83ee8wysk5.fsf@gnu.org> <87v9286jwt.fsf@gmail.com> <835yu7zsiz.fsf@gnu.org> <83r1cvy07v.fsf@gnu.org> <83fstbxrmd.fsf@gnu.org> <87ee8u78an.fsf@gmail.com> <83sfxawh2j.fsf@gnu.org> <87tuho5qs5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2263"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: 51089-done@debbugs.gnu.org, Richard Stallman To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 11 23:42:54 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ma34Q-0000ST-1X for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Oct 2021 23:42:54 +0200 Original-Received: from localhost ([::1]:39896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ma34O-0001Q3-Th for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Oct 2021 17:42:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ma2yk-0005Xw-4n for bug-gnu-emacs@gnu.org; Mon, 11 Oct 2021 17:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49569) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ma2yj-00031Y-Rm for bug-gnu-emacs@gnu.org; Mon, 11 Oct 2021 17:37:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ma2yj-0001Jn-PV for bug-gnu-emacs@gnu.org; Mon, 11 Oct 2021 17:37:01 -0400 Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Oct 2021 21:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 51089 X-GNU-PR-Package: emacs Mail-Followup-To: 51089@debbugs.gnu.org, joaotavora@gmail.com, joaotavora@gmail.com Original-Received: via spool by 51089-done@debbugs.gnu.org id=D51089.16339881815014 (code D ref 51089); Mon, 11 Oct 2021 21:37:01 +0000 Original-Received: (at 51089-done) by debbugs.gnu.org; 11 Oct 2021 21:36:21 +0000 Original-Received: from localhost ([127.0.0.1]:32880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ma2y4-0001In-PN for submit@debbugs.gnu.org; Mon, 11 Oct 2021 17:36:20 -0400 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:33420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ma2y2-0001IW-RH for 51089-done@debbugs.gnu.org; Mon, 11 Oct 2021 17:36:19 -0400 Original-Received: by mail-wr1-f46.google.com with SMTP id m22so60451860wrb.0 for <51089-done@debbugs.gnu.org>; Mon, 11 Oct 2021 14:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=KeN4wJ43g2BQ5oFr1sW+I3FXt5eb+W7MFVOTI/o8Y+k=; b=iAHVclYtxeF1FKGwQ0FX+QpCaSRT/FkrsMnBtAGi3tm8rg0BnG78JREQg/sX5JIlpb I6bvxziq0rZW1FDDtenX7qnb1VQXyturAC0dKCEWKVnySEP+DpoXkwcbku9PJf3z+7/2 Ur611fVuZpdzbEHTX/Grm7Sa9Qu/ReXkZMGTo1vCNadycO3DivYWKufRjw5XE2hku4Ij h/Mflu8+foTowwO9uQPhWtwNkplbnLkF1Y7czzVRJe88A34fIiQhKWniibsag1J2w/6o N/gykrS6+YBe4Kab7+4cerZTKzpsSRQlP5t3ivGDmCNNYrs/u21RfFG8aWRqEphScFGL ea3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=KeN4wJ43g2BQ5oFr1sW+I3FXt5eb+W7MFVOTI/o8Y+k=; b=02RwNWJYasDDoKc0ldr0N2/doUHbJUlalUvmGL0H+hRpkmGPhRR3UZmCMrG/KpVJRg Xkvpja2MNNbtBXVJ+ufyrX62/xCFeZJ7Loh/KD3sLhM9lQADmIu6GbfXwoN+6ncr/7FH ZuBJB+5lKNQYRYwZIHzJ/i6fzRsxOGH66mkFJB6LPkmHbcxc/mO9NnY7XxbdtQ7Qle7w bsu6dnK89nRJbn1nOfb13vif3HeTgd8yD+EvRWV8lze5zYfBBQkLswLfFi3aIJXkTWpS ktb3CJNzJj39uVJvNloxf16LIRxdYAIK3Zpomn0dU/35bEgqOcgfbOMoOPkVR/NOM+Nf 2RuA== X-Gm-Message-State: AOAM532xaudER7C6sP5kD3R1VFnqb4hVHR8TAw54d4K0xFiunTJdwp6p JI42hjdYWrlz2fUo24geMYc= X-Google-Smtp-Source: ABdhPJyZk+0hU5uGGUTLwy+quVUceBsZRv6a+d/U+Zw8u32U5W/UgnsNcvWBxua8T3XQ8Yv2Zvv7Ow== X-Received: by 2002:adf:a4ca:: with SMTP id h10mr27480864wrb.28.1633988172858; Mon, 11 Oct 2021 14:36:12 -0700 (PDT) Original-Received: from krug (a83-132-196-192.cpe.netcabo.pt. [83.132.196.192]) by smtp.gmail.com with ESMTPSA id a2sm8681315wrv.15.2021.10.11.14.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 14:36:12 -0700 (PDT) In-Reply-To: <87tuho5qs5.fsf@gmail.com> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Mon, 11 Oct 2021 01:49:46 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216970 Archived-At: Jo=C3=A3o T=C3=A1vora 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: "^*+-/<=3D>_|" 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: ;; =3D> (& * + - / < =3D > _ | ** ++ -- -/ -> /=3D <=3D <> >=3D || =C2= =AC --- --> ->>) 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=C3=A3o