From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 01 06:18:53 2018 Received: (at submit) by debbugs.gnu.org; 1 Jun 2018 10:18:53 +0000 Received: from localhost ([127.0.0.1]:56826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOh92-0008Iv-Vt for submit@debbugs.gnu.org; Fri, 01 Jun 2018 06:18:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOh91-0008If-M5 for submit@debbugs.gnu.org; Fri, 01 Jun 2018 06:18:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOh8v-00014W-Bx for submit@debbugs.gnu.org; Fri, 01 Jun 2018 06:18:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51235) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fOh8v-00014O-7t for submit@debbugs.gnu.org; Fri, 01 Jun 2018 06:18:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOh8t-0003jE-Q1 for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 06:18:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOh8q-00011x-Hs for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 06:18:43 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:45703) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOh8q-00010B-A8 for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 06:18:40 -0400 Received: from cm-84.212.221.165.getinternet.no ([84.212.221.165] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fOh8g-0005lt-BU for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 12:18:36 +0200 From: Lars Ingebrigtsen To: bug-gnu-emacs@gnu.org Subject: 27.0.50; More helpful error message for unescaped character literals Date: Fri, 01 Jun 2018 12:18:30 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) A reddit user noted these messages popping up when starting Emacs Loading =E2=80=98~/.emacs.d/init=E2=80=99: unescaped character literals `?[= ', `?]' detected! and wondered what to do about it. Perhaps it would be a good idea to just say something like unescaped character literals `?[', `?]' detected, `?\[', `?\]' expected or something along those lines? For Emacs 26.2. In GNU Emacs 27.0.50 (build 20, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2018-05-19 built on stories Repository revision: f4d9fd3dd45f767eca33fbf1beee40da790fa74e Windowing system distributor 'The X.Org Foundation', version 11.0.11902000 System Description: Debian GNU/Linux 9 (stretch) --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 02 06:00:54 2018 Received: (at 31676) by debbugs.gnu.org; 2 Jun 2018 10:00:54 +0000 Received: from localhost ([127.0.0.1]:58382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fP3L8-000674-Ex for submit@debbugs.gnu.org; Sat, 02 Jun 2018 06:00:54 -0400 Received: from mail-oi0-f49.google.com ([209.85.218.49]:46021) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fP3L2-00066n-NX for 31676@debbugs.gnu.org; Sat, 02 Jun 2018 06:00:49 -0400 Received: by mail-oi0-f49.google.com with SMTP id b130-v6so24506363oif.12 for <31676@debbugs.gnu.org>; Sat, 02 Jun 2018 03:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=i5krbbXeIU1sEhy1ct3VKtFDkbs3kupIDLtLqTbMYFQ=; b=JR/KGL6rq7mznfMVu6JIWQzkcR5qLGVy4LgfLanjrkku20gKwyKm99/3lYvUEhMeLU i8ikhPYA5tdU7zjUpGJ0sc4sxMBg1aC5eu3KAGY9uxE1rbGoHN1Cra1rhCZZPQLHUAj+ Vdor8f/vWKc5RqCNHDqNpD1vgfVIuCsWiT/0qf/E2P2a2Ilmay6/FQd8HP5bfTbsiyFa kZjULnY5+i//rl6JBqViyr0p7aMnxHb/cRAeyZqyLSrO30ZpAuS3mqQLlElE8B+Jon7G sGlNpMzihdS1RqGyJrMNyBI8kfNKRrwczCLINsEH7BIM7EVTXHr6PgSTkZcjbpLPWj73 nPqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i5krbbXeIU1sEhy1ct3VKtFDkbs3kupIDLtLqTbMYFQ=; b=QdK6oBeP9Qq3Y7MfbBFb/4+SJ+gcA6Hklam3ZJUhuqg+v4I6vhnHh60YKp8tHdJ2/X 5NVXFMjt9CeRS6QW+1K1AeeT4b+xsXYRobPtoE6UdWZ0ybD4NspdNxtonG0ip30QMiH0 BKuU7ZTxjVZMxRM8gOy3DZIyqV/EerjDI7HfFH5AGqXyCDEQLPpc9q/fh0gYm+zj6Pfi b3xle+0GwPBZKwG1K5zG8dd8TvxgSXtPNZzBl6W38N283//b7DNKXULQ//XK3NA2LHM0 V27ckM8czDTijl/m4UoPYNuEmQfAvsrrUHRHmoq3WMON4wGFPyOnT1uqWLhqeqtIH9m3 yzRA== X-Gm-Message-State: APt69E2kAlAS5o7polpkzYVaLjtn7DtBnUWmYtv6UQSjZ2rCyduoy1DC d7WJl1EOgiuprbSTOZAhAEJv8e9nx4NoqoERL73fMA== X-Google-Smtp-Source: ADUXVKL1KB5g/gsuKbZvUEvWvw/KX+lN4acaRFZxNpTLhqKyid6nQMb5/sZ02Xa09KYGd3s94QHpYCIGd7N8po8A+/c= X-Received: by 2002:aca:c314:: with SMTP id t20-v6mr7385779oif.341.1527933638641; Sat, 02 Jun 2018 03:00:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Philipp Stephani Date: Sat, 2 Jun 2018 12:00:26 +0200 Message-ID: Subject: Re: bug#31676: 27.0.50; More helpful error message for unescaped character literals To: Lars Ingebrigtsen Content-Type: multipart/mixed; boundary="000000000000c5a213056da5c53c" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 31676 Cc: 31676@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000c5a213056da5c53c Content-Type: multipart/alternative; boundary="000000000000c5a20f056da5c53a" --000000000000c5a20f056da5c53a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Lars Ingebrigtsen schrieb am Fr., 1. Juni 2018 um 12:19 Uhr: > > A reddit user noted these messages popping up when starting Emacs > > Loading =E2=80=98~/.emacs.d/init=E2=80=99: unescaped character literals `= ?[', `?]' > detected! > > and wondered what to do about it. Perhaps it would be a good idea to > just say something like > > unescaped character literals `?[', `?]' detected, `?\[', `?\]' expected > > or something along those lines? For Emacs 26.2. > > Sounds reasonable, here's a patch. --000000000000c5a20f056da5c53a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Lars I= ngebrigtsen <larsi@gnus.org> sc= hrieb am Fr., 1. Juni 2018 um 12:19=C2=A0Uhr:

A reddit user noted these messages popping up when starting Emacs

Loading =E2=80=98~/.emacs.d/init=E2=80=99: unescaped character literals `?[= ', `?]' detected!

and wondered what to do about it.=C2=A0 Perhaps it would be a good idea to<= br> just say something like

unescaped character literals `?[', `?]' detected, `?\[', `?\]&#= 39; expected

or something along those lines?=C2=A0 For Emacs 26.2.


Sounds reasonable, here's a patch.=C2= =A0
--000000000000c5a20f056da5c53a-- --000000000000c5a213056da5c53c Content-Type: text/plain; charset="US-ASCII"; name="0001-Make-warning-about-unescaped-character-literals-more-h.txt" Content-Disposition: attachment; filename="0001-Make-warning-about-unescaped-character-literals-more-h.txt" Content-Transfer-Encoding: base64 Content-ID: <163bff0dc91205947701> X-Attachment-Id: 163bff0dc91205947701 RnJvbSA0YmQ4MzQ4NzUzOTgwYmU5NWRjNGJjYmE0N2U1MmY3Zjc5MjU1ZmI2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQaGlsaXBwIFN0ZXBoYW5pIDxwaHN0QGdvb2dsZS5jb20+CkRh dGU6IFNhdCwgMiBKdW4gMjAxOCAxMTo1OTowMiArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIE1ha2Ug d2FybmluZyBhYm91dCB1bmVzY2FwZWQgY2hhcmFjdGVyIGxpdGVyYWxzIG1vcmUgaGVscGZ1bC4K ClNlZSBCdWcjMzE2NzYuCgoqIHNyYy9scmVhZC5jIChGbHJlYWRfdW5l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gICAgICAgICAgICAgICAgICAgICAgIGxpc3Qz IChRZm9ybWF0LCBpbm5lcl9mb3JtYXQsIFFjaGFyKSksCi0gICAgICAgICAgICAgICAgICAgICBG c29ydCAoVmxyZWFkX3VuZXNjYXBlZF9jaGFyYWN0ZXJfbGl0ZXJhbHMsIFFsc3MpLAotICAgICAg ICAgICAgICAgICAgICAgc2VwYXJhdG9yKSk7CisgIExpc3BfT2JqZWN0IGZvcm1hdF91bmVzY2Fw ZWQgPSBidWlsZF9zdHJpbmcgKCJgPyVjJyIpOworICBMaXNwX09iamVjdCBmb3JtYXRfZXNjYXBl ZCA9IGJ1aWxkX3N0cmluZyAoImA/XFwlYyciKTsKKyAgTGlzcF9PYmplY3Qgc29ydGVkID0gRnNv cnQgKFZscmVhZF91bmVzY2FwZWRfY2hhcmFjdGVyX2xpdGVyYWxzLCBRbHNzKTsKKyAgcmV0dXJu IENBTExOIChGZm9ybWF0X21lc3NhZ2UsIGZvcm1hdCwKKyAgICAgICAgICAgICAgICBGbWFwY29u Y2F0IChsaXN0MyAoUWxhbWJkYSwgbGlzdDEgKFFjaGFyKSwKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbGlzdDMgKFFmb3JtYXQsIGZvcm1hdF91bmVzY2FwZWQsIFFjaGFyKSks CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc29ydGVkLCBzZXBhcmF0b3IpLAorICAgICAg ICAgICAgICAgIEZtYXBjb25jYXQgKGxpc3QzIChRbGFtYmRhLCBsaXN0MSAoUWNoYXIpLAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0MyAoUWZvcm1hdCwgZm9ybWF0X2Vz Y2FwZWQsIFFjaGFyKSksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc29ydGVkLCBzZXBh cmF0b3IpKTsKIH0KIAogREVGVU4gKCJnZXQtbG9hZC1zdWZmaXhlcyIsIEZnZXRfbG9hZF9zdWZm aXhlcywgU2dldF9sb2FkX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tbGlzcC9ieXRlY29tcC10ZXN0cy5lbApAQCAtNTIyLDcg KzUyMiw3IEBAIGJ5dGVjb21wLXRlc3RzLS13aXRoLXRlbXAtZmlsZQogKGVydC1kZWZ0ZXN0IGJ5 dGVjb21wLXRlc3RzLS11bmVzY2FwZWQtY2hhci1saXRlcmFscyAoKQogICAiQ2hlY2sgdGhhdCBi eXRlIGNvbXBpbGluZyB3YXJucyBhYm91dCB1bmVzY2FwZWQgY2hhcmFjdGVyCiBsaXRlcmFscyAo QnVnIzIwODUyKS4iCi0gIChzaG91bGQgKGJvdW5kcCAnbHJlYWQtLXVuZXNjYXBlZC1jaGFyYWN0 ZXItbGl0ZXJhbHMpKQorICAoc2hvdWxkLW5vdCAoYm91bmRwICdscmVhZC0tdW5lc2NhcGVkLWNo YXJhY3Rlci1saXRlcmFscykpCiAgIChieXRlY29tcC10ZXN0cy0td2l0aC10ZW1wLWZpbGUgc291 cmNlCiAgICAgKHdyaXRlLXJlZ2lvbiAiKGxpc3QgPykgPyggPzsgP1wiID9bID9dKSIgbmlsIHNv dXJjZSkKICAgICAoYnl0ZWNvbXAtdGVzdHMtLXdpdGgtdGVtcC1maWxlIGRlc3RpbmF0aW9uCkBA IC01MzMsNyArNTMzLDkgQEAgYnl0ZWNvbXAtdGVzdHMtLXdpdGgtdGVtcC1maWxlCiAgICAgICAg IChzaG91bGQgKGVxdWFsIChjZHIgZXJyKQogICAgICAgICAgICAgICAgICAgICAgICAobGlzdCAo Y29uY2F0ICJ1bmVzY2FwZWQgY2hhcmFjdGVyIGxpdGVyYWxzICIKICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAiYD9cIicsIGA/KCcsIGA/KScsIGA/OycsIGA/WycsIGA/XScg IgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJkZXRlY3RlZCEiKSkpKSkp KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZGV0ZWN0ZWQsICIKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiYD9cXFwiJywgYD9cXCgnLCBgP1xc KScsIGA/XFw7JywgYD9cXFsnLCAiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgImA/XFxdJyBleHBlY3RlZCEiKSkpKSkpKSkKIAogKGVydC1kZWZ0ZXN0IGJ5dGVjb21wLXRl c3RzLS1vbGQtc3R5bGUtYmFja3F1b3RlcyAoKQogICAiQ2hlY2sgdGhhdCBieXRlIGNvbXBpbGlu ZyB3YXJucyBhYm91dCBvbGQtc3R5bGUgYmFja3F1b3Rlcy4iCmRpZmYgLS1naXQgYS90ZXN0L3Ny Yy9scmVhZC10ZXN0cy5lbCBiL3Rlc3Qvc3JjL2xyZWFkLXRlc3RzLmVsCmluZGV4IDYzOWE2ZGE5 M2EuLjUwYWIwODRkYmIgMTAwNjQ0Ci0tLSBhL3Rlc3Qvc3JjL2xyZWFkLXRlc3RzLmVsCisrKyBi L3Rlc3Qvc3JjL2xyZWFkLXRlc3RzLmVsCkBAIC0xNDAsNyArMTQwLDkgQEAgbHJlYWQtdGVzdHMt LWxhc3QtbWVzc2FnZQogICAgIChzaG91bGQgKGVxdWFsIChscmVhZC10ZXN0cy0tbGFzdC1tZXNz YWdlKQogICAgICAgICAgICAgICAgICAgIChjb25jYXQgKGZvcm1hdC1tZXNzYWdlICJMb2FkaW5n IGAlcyc6ICIgZmlsZS1uYW1lKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgInVuZXNjYXBl ZCBjaGFyYWN0ZXIgbGl0ZXJhbHMgIgotICAgICAgICAgICAgICAgICAgICAgICAgICAgImA/XCIn LCBgPygnLCBgPyknLCBgPzsnLCBgP1snLCBgP10nIGRldGVjdGVkISIpKSkpKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgImA/XCInLCBgPygnLCBgPyknLCBgPzsnLCBgP1snLCBgP10nIGRl dGVjdGVkLCAiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAiYD9cXFwiJywgYD9cXCgnLCBg P1xcKScsIGA/XFw7JywgYD9cXFsnLCBgP1xcXScgIgorICAgICAgICAgICAgICAgICAgICAgICAg ICAgImV4cGVjdGVkISIpKSkpKQogCiAoZXJ0LWRlZnRlc3QgbHJlYWQtdGVzdHMtLWZ1bm55LXF1 b3RlLXN5bWJvbHMgKCkKICAgIkNoZWNrIHRoYXQgJ3NtYXJ0IHF1b3Rlcycgb3Igc2ltaWxhciB0 cmlnZ2VyIGVycm9ycyBpbiBzeW1ib2wgbmFtZXMuIgotLSAKMi4xNy4xCgo= --000000000000c5a213056da5c53c-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 08 10:51:29 2018 Received: (at 31676) by debbugs.gnu.org; 8 Jun 2018 14:51:29 +0000 Received: from localhost ([127.0.0.1]:39767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRIjh-0006um-4Q for submit@debbugs.gnu.org; Fri, 08 Jun 2018 10:51:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRIjg-0006uZ-5G for 31676@debbugs.gnu.org; Fri, 08 Jun 2018 10:51:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRIjW-0003WL-6Y for 31676@debbugs.gnu.org; Fri, 08 Jun 2018 10:51:23 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRIjW-0003WF-2h; Fri, 08 Jun 2018 10:51:18 -0400 Received: from [176.228.60.248] (port=1597 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fRIjU-0001zI-Aq; Fri, 08 Jun 2018 10:51:17 -0400 Date: Fri, 08 Jun 2018 17:51:09 +0300 Message-Id: <837en9uyaq.fsf@gnu.org> From: Eli Zaretskii To: Philipp Stephani In-reply-to: (message from Philipp Stephani on Sat, 2 Jun 2018 12:00:26 +0200) Subject: Re: bug#31676: 27.0.50; More helpful error message for unescaped character literals References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 31676 Cc: larsi@gnus.org, 31676@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > Date: Sat, 2 Jun 2018 12:00:26 +0200 > Cc: 31676@debbugs.gnu.org > > Sounds reasonable, here's a patch. > > From 4bd8348753980be95dc4bcba47e52f7f79255fb6 Mon Sep 17 00:00:00 2001 > From: Philipp Stephani > Date: Sat, 2 Jun 2018 11:59:02 +0200 > Subject: [PATCH] Make warning about unescaped character literals more helpful. > > See Bug#31676. > > * src/lread.c (Flread_unescaped_character_literals_warning): New > defun. > (load_warn_unescaped_character_literals): Use it. > (syms_of_lread): Define new defun. Unintern internal > variable, which is not used any more outside of lread.c > > * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Use new > defun. > > * test/src/lread-tests.el (lread-tests--unescaped-char-literals): > test/lisp/emacs-lisp/bytecomp-tests.el > (bytecomp-tests--unescaped-char-literals): Adapt unit tests. Sounds okay, but can you tell why you implemented lread--unescaped-character-literals in C? If that's because you need to call it from load_warn_unescaped_character_literals, then C functions can call Lisp functions with no problems, we have several examples of that in the sources. AFAICT, the C implementation is just a "transliteration" of straightforward Lisp code, so it reads strange. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 09 13:12:50 2018 Received: (at 31676) by debbugs.gnu.org; 9 Jun 2018 17:12:50 +0000 Received: from localhost ([127.0.0.1]:41487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRhQ1-0001mp-VA for submit@debbugs.gnu.org; Sat, 09 Jun 2018 13:12:50 -0400 Received: from mail-ot0-f174.google.com ([74.125.82.174]:45395) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRhQ1-0001md-2W for 31676@debbugs.gnu.org; Sat, 09 Jun 2018 13:12:49 -0400 Received: by mail-ot0-f174.google.com with SMTP id a5-v6so19261254otf.12 for <31676@debbugs.gnu.org>; Sat, 09 Jun 2018 10:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9wnwGIx4WK/4n4KDmaZaH51ipf6v/7zg7861vqzY9XU=; b=EW5roK9lx6zQbE1Sv0lQSJrvIcXmhOdJPCwPh+BOAB/JDYSKRPPQuTmLL5zcT1IZP9 NrZJkYSCSKqrpWlWkUbXDmopRL76vW5dYbFHlmptJIFNz0FHAzaTiKC14gAYMYuD5TWp yt5ZuAeddmbe2CLpHlllWVef6bs3A/ZAgHohTVx/6wDo+tPek/1iCXLwDlVuQGSbPBaW qnyK+fFd1ueuGJMyoTImoHnHJeH0SQliEHZUOvXXLWI9EAQleEWgq41cEGjsBTfJ43Ue mS1N919dvMWZ//RHjoXhUQLVfIg92ULmC7od2JLHZW9ezwzfEf9SRA3MNZVZaA2GaGpb xkbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9wnwGIx4WK/4n4KDmaZaH51ipf6v/7zg7861vqzY9XU=; b=H1hi1GKu+QlBSAY4E9NI3C1y/GlfFIrX2Xe8fUCT0Nz54VDyjE8Y3ohtqimCDym4U2 jO9buYBJvGr+jXgkoZ7dMmJxyslqefsVPnzaA+se8/6mReUo356w3tYAQlTTpHF+K5lA ktB+JdMZyaLbMKv+eArZieTtYjnyruqEHXQLt1xh+xpPoWY0ge0hjMAbjgoGh13a5XB8 3GwkHtuEw0ngwSy9HfVJMOJFE2+m8d7zL0exs4MpNSzCoFp/zi2RlclgrrXLswIoPA4d /tcloZGSQ4euFo1I/bBithHYnPa9RvjcHQAHriey0Ovgoj1M5PKqYprXTtacxWrAn3MP qo/Q== X-Gm-Message-State: APt69E0ueatxCzxUDs62oIPhVjw31g34kF5jUbXq87kp8cdLPrXLdv0g CyvHVmIfAGGg7ugNgEu6m/UytUehtOwjVjm9E9s= X-Google-Smtp-Source: ADUXVKJyZ8vxxHSjf5xfpq8f4zOtAu+MvMFaqA3DZ8Zb0gaWY4DAmdaDfYYgeZDpSj36PL2eaL4x1yj+T3fZw0r5RNU= X-Received: by 2002:a9d:282e:: with SMTP id m43-v6mr6737318otb.393.1528564362022; Sat, 09 Jun 2018 10:12:42 -0700 (PDT) MIME-Version: 1.0 References: <837en9uyaq.fsf@gnu.org> In-Reply-To: <837en9uyaq.fsf@gnu.org> From: Philipp Stephani Date: Sat, 9 Jun 2018 19:12:30 +0200 Message-ID: Subject: Re: bug#31676: 27.0.50; More helpful error message for unescaped character literals To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000d09535056e389f5b" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 31676 Cc: larsi@gnus.org, 31676@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --000000000000d09535056e389f5b Content-Type: text/plain; charset="UTF-8" Eli Zaretskii schrieb am Fr., 8. Juni 2018 um 16:51 Uhr: > > Date: Sat, 2 Jun 2018 12:00:26 +0200 > > Cc: 31676@debbugs.gnu.org > > > > Sounds reasonable, here's a patch. > > > > From 4bd8348753980be95dc4bcba47e52f7f79255fb6 Mon Sep 17 00:00:00 2001 > > From: Philipp Stephani > > Date: Sat, 2 Jun 2018 11:59:02 +0200 > > Subject: [PATCH] Make warning about unescaped character literals more > helpful. > > > > See Bug#31676. > > > > * src/lread.c (Flread_unescaped_character_literals_warning): New > > defun. > > (load_warn_unescaped_character_literals): Use it. > > (syms_of_lread): Define new defun. Unintern internal > > variable, which is not used any more outside of lread.c > > > > * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Use new > > defun. > > > > * test/src/lread-tests.el (lread-tests--unescaped-char-literals): > > test/lisp/emacs-lisp/bytecomp-tests.el > > (bytecomp-tests--unescaped-char-literals): Adapt unit tests. > > Sounds okay, but can you tell why you implemented > lread--unescaped-character-literals in C? If that's because you need > to call it from load_warn_unescaped_character_literals, then C > functions can call Lisp functions with no problems, we have several > examples of that in the sources. AFAICT, the C implementation is just > a "transliteration" of straightforward Lisp code, so it reads strange. > The function uses an uninterned variable, so it has to be in C. I think that's slightly better than interning the variable and having some Lisp function access it (the latter would have one additional internal symbol). --000000000000d09535056e389f5b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Fr., 8. Juni 2018 um 16:51=C2=A0Uhr:
> Date: Sat, 2 Jun 2018 12:00:26 +0200
> Cc: 31676@d= ebbugs.gnu.org
>
> Sounds reasonable, here's a patch.
>
> From 4bd8348753980be95dc4bcba47e52f7f79255fb6 Mon Sep 17 00:00:00 2001=
> From: Philipp Stephani <phst@google.com>
> Date: Sat, 2 Jun 2018 11:59:02 +0200
> Subject: [PATCH] Make warning about unescaped character literals more = helpful.
>
> See Bug#31676.
>
> * src/lread.c (Flread_unescaped_character_literals_warning): New
> defun.
> (load_warn_unescaped_character_literals): Use it.
> (syms_of_lread): Define new defun.=C2=A0 Unintern internal
> variable, which is not used any more outside of lread.c
>
> * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Use new
> defun.
>
> * test/src/lread-tests.el (lread-tests--unescaped-char-literals):
> test/lisp/emacs-lisp/bytecomp-tests.el
> (bytecomp-tests--unescaped-char-literals): Adapt unit tests.

Sounds okay, but can you tell why you implemented
lread--unescaped-character-literals in C?=C2=A0 If that's because you n= eed
to call it from load_warn_unescaped_character_literals, then C
functions can call Lisp functions with no problems, we have several
examples of that in the sources.=C2=A0 AFAICT, the C implementation is just=
a "transliteration" of straightforward Lisp code, so it reads str= ange.

The function uses an uninterned v= ariable, so it has to be in C. I think that's slightly better than inte= rning the variable and having some Lisp function access it (the latter woul= d have one additional internal symbol).=C2=A0
--000000000000d09535056e389f5b-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 09 13:31:42 2018 Received: (at 31676) by debbugs.gnu.org; 9 Jun 2018 17:31:42 +0000 Received: from localhost ([127.0.0.1]:41491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRhiE-0002G1-LQ for submit@debbugs.gnu.org; Sat, 09 Jun 2018 13:31:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRhi9-0002Fl-8g for 31676@debbugs.gnu.org; Sat, 09 Jun 2018 13:31:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRhhz-0003Th-E3 for 31676@debbugs.gnu.org; Sat, 09 Jun 2018 13:31:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRhhz-0003TZ-9V; Sat, 09 Jun 2018 13:31:23 -0400 Received: from [176.228.60.248] (port=1551 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fRhhx-0003XB-Bf; Sat, 09 Jun 2018 13:31:22 -0400 Date: Sat, 09 Jun 2018 20:31:25 +0300 Message-Id: <83k1r7sw7m.fsf@gnu.org> From: Eli Zaretskii To: Philipp Stephani In-reply-to: (message from Philipp Stephani on Sat, 9 Jun 2018 19:12:30 +0200) Subject: Re: bug#31676: 27.0.50; More helpful error message for unescaped character literals References: <837en9uyaq.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 31676 Cc: larsi@gnus.org, 31676@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Philipp Stephani > Date: Sat, 9 Jun 2018 19:12:30 +0200 > Cc: larsi@gnus.org, 31676@debbugs.gnu.org > > Sounds okay, but can you tell why you implemented > lread--unescaped-character-literals in C? If that's because you need > to call it from load_warn_unescaped_character_literals, then C > functions can call Lisp functions with no problems, we have several > examples of that in the sources. AFAICT, the C implementation is just > a "transliteration" of straightforward Lisp code, so it reads strange. > > The function uses an uninterned variable, so it has to be in C. I think that's slightly better than interning the > variable and having some Lisp function access it (the latter would have one additional internal symbol). Why does it need an uninterned variable? And if it does, why cannot it create a symbol that is not in obarray? From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 19 05:54:52 2019 Received: (at 31676) by debbugs.gnu.org; 19 Apr 2019 09:54:52 +0000 Received: from localhost ([127.0.0.1]:43470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHQEO-0000Nk-Bx for submit@debbugs.gnu.org; Fri, 19 Apr 2019 05:54:52 -0400 Received: from mail-oi1-f180.google.com ([209.85.167.180]:42663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHQEM-0000NV-Hy for 31676@debbugs.gnu.org; Fri, 19 Apr 2019 05:54:51 -0400 Received: by mail-oi1-f180.google.com with SMTP id w139so3674996oie.9 for <31676@debbugs.gnu.org>; Fri, 19 Apr 2019 02:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aeUA8axUsv+IgONxWmqTlije063Gmeixwduur33iyhk=; b=fqDzAdlsSb4oTrAIPbojXjz3VCGzqVAZdIhBLLj/4n+8Vfp0cQVfTQ0sFJIejlBYk2 d/UvA4vBvH5axUJFZIxlDsMGvQNM5hZkanpgA6WbwtA6yRuckwjwe4ngKfgifA6K1JHx KfZfUA2+bBKOkTMSz4zOy5VDq/Avwe7t8m3hQ6DtHX4cSlpa12iJIriIS5kisCTszRmS OyEnBcwfcnSG5DCzYXTAN4h540xIFeWpkiQIvUSL6X1encRZ+8cOJwEDwlHf6+i6AOEf Vz/MikDpXplNbK1wOQbexV8wKZMwi7OGWeD+nY9GJ0PvfOYispQGxcrm9dqxeU1wTF+A USxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aeUA8axUsv+IgONxWmqTlije063Gmeixwduur33iyhk=; b=sTx6JNlbgqWp0yX7uQqpHeb7r9145IBydWsClkvGFBwN/BeIyGZ30sIhv3s/sffHJu J0uMhwO13llll4AmSNVcCfgAgLk8xk/+CGI/tAwAB8aOAPYslcxokpOj+xp/L3DaWEms SLw4Y42unsvNOY/H/xLMUBdOFR5LReoHLLIPPnZV3dNn9GzDmS2HNyaJh/91y9mxAPNz PFe0JLo50rgs3JOx5gg57bfNBSqqVyYeyt4cK5n0Yyb3Ht607oZlyqAGylaxkxQvai49 2dOTLQfRnfvDfM+bG+OVBLYwRVxT0uagOslvG9thmggtkKvjYk6nTyuNgKhLj4JA6ini r1CA== X-Gm-Message-State: APjAAAXjtLnaxcB0crDRLIynUBzxyW1+/hWyXy1MJxwX8ye5gbgf4xZz miGNWzuGuTB50jLS8ImMFmb55ZY8qazNXbkVTOk= X-Google-Smtp-Source: APXvYqzxBj5s3h9d3NK+oTQGH5tUWleMN3fv8modq819Ng/WMh4IM7zYkS83GBD6+aOwd1o1vSEBaE/pasY0E0j8KhM= X-Received: by 2002:aca:47d7:: with SMTP id u206mr1468549oia.9.1555667683777; Fri, 19 Apr 2019 02:54:43 -0700 (PDT) MIME-Version: 1.0 References: <837en9uyaq.fsf@gnu.org> <83k1r7sw7m.fsf@gnu.org> In-Reply-To: <83k1r7sw7m.fsf@gnu.org> From: Philipp Stephani Date: Fri, 19 Apr 2019 11:54:32 +0200 Message-ID: Subject: Re: bug#31676: 27.0.50; More helpful error message for unescaped character literals To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 31676 Cc: Lars Ingebrigtsen , 31676@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Am Sa., 9. Juni 2018 um 19:31 Uhr schrieb Eli Zaretskii : > > > From: Philipp Stephani > > Date: Sat, 9 Jun 2018 19:12:30 +0200 > > Cc: larsi@gnus.org, 31676@debbugs.gnu.org > > > > Sounds okay, but can you tell why you implemented > > lread--unescaped-character-literals in C? If that's because you need > > to call it from load_warn_unescaped_character_literals, then C > > functions can call Lisp functions with no problems, we have several > > examples of that in the sources. AFAICT, the C implementation is just > > a "transliteration" of straightforward Lisp code, so it reads strange. > > > > The function uses an uninterned variable, so it has to be in C. I think that's slightly better than interning the > > variable and having some Lisp function access it (the latter would have one additional internal symbol). > > Why does it need an uninterned variable? It doesn't need to be uninterned, but it's cleaner that way because no other code can access the variable. > And if it does, why cannot > it create a symbol that is not in obarray? That's what the patch does. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 19 07:43:58 2019 Received: (at 31676) by debbugs.gnu.org; 19 Apr 2019 11:43:58 +0000 Received: from localhost ([127.0.0.1]:43530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHRvy-0005II-3K for submit@debbugs.gnu.org; Fri, 19 Apr 2019 07:43:58 -0400 Received: from mail-qk1-f179.google.com ([209.85.222.179]:33696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHRvv-0005I3-5I for 31676@debbugs.gnu.org; Fri, 19 Apr 2019 07:43:57 -0400 Received: by mail-qk1-f179.google.com with SMTP id k189so2809975qkc.0 for <31676@debbugs.gnu.org>; Fri, 19 Apr 2019 04:43:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=B43mbyN3F/74sbzrw/3lp/GseJXmn2WbQJqFud5YrXg=; b=nr5Knv4fefglLNJUfa5fEeaOK1cNQVCE8ccEDO5aayBCp7afD+wV4ih8I1fOUe+nAv rwu/gZolvs5oHhfx6ygE6LJ3i++5U/7mxpPff8ADVKUn+B8AimwonxHTdhRx3SbAnn/3 rJgGYI+9jzWQR0XaYxc7+dtsA7ijsVGyTOjFIPJ3f88rst6vJ366MN2eNjcuQrpbQeqz 5uYo7QPHQq0PKXitoKI0BrGy1S+7rPSTOqRFw6dvseEJlxH31yUliQClEPuv5aZ3yBKn fQashMGmiq2xuT99j5xNypWltenLmPaEJHJo8QiBPQVsG2FUJfvSWzsr9H88S5qGArIK 6WdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=B43mbyN3F/74sbzrw/3lp/GseJXmn2WbQJqFud5YrXg=; b=EGxGqWfb2trbUvADwrc4tTN+CjuLiTcI74ubiwK9KfECAmpi5jNSM/V/4AfujAIN1k n9FfyPvM5/RThl+KjDO0SyRDR/jZXTp3LFB7Dv+Ac5rh/UWTI+EbhnZw2adlOmGL/4ck qr3aGmI0g5V63fC2Lf7JI0ZNWxxyDVqTKmazgEfoo5+kurtwtcyuyDDqoDRjLuqsV+fF qKSMqrVuc5tfl1kq/oSxhxNtAfChUZCVT7ASMgFlb75cLz1Um6/sEmorakKvRCWJxa8J jGnb4u9zWiZ1jw2onTgv17eN2ZQRXsD+yQsdBjaBgt0CsAKEpiB9VmfPR5pQ/R6nXhuX wN4w== X-Gm-Message-State: APjAAAUL0gEJE3fS8GctGYfJ31pdYmyuQUrvWawyO2TjfgbKCCq071jA akJbwUtc67gRdI6lGgei7lMKexib X-Google-Smtp-Source: APXvYqybZcCCQKO+su15IYFd5cNFou6eqkjAFj3i9x6r3cmCu1errMMuUz6TUkYe7ZgJOl5GJ9EXBA== X-Received: by 2002:ae9:f71a:: with SMTP id s26mr2607889qkg.299.1555674229352; Fri, 19 Apr 2019 04:43:49 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id j39sm461454qtj.69.2019.04.19.04.43.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Apr 2019 04:43:48 -0700 (PDT) From: Noam Postavsky To: Philipp Stephani Subject: Re: bug#31676: 27.0.50; More helpful error message for unescaped character literals References: <837en9uyaq.fsf@gnu.org> <83k1r7sw7m.fsf@gnu.org> Date: Fri, 19 Apr 2019 07:43:47 -0400 In-Reply-To: (Philipp Stephani's message of "Fri, 19 Apr 2019 11:54:32 +0200") Message-ID: <87tveuusng.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 31676 Cc: Eli Zaretskii , Lars Ingebrigtsen , 31676@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philipp Stephani writes: >> > The function uses an uninterned variable, so it has to be in C. I think that's slightly better than interning the >> > variable and having some Lisp function access it (the latter would have one additional internal symbol). >> Why does it need an uninterned variable? > > It doesn't need to be uninterned, but it's cleaner that way because no > other code can access the variable. > >> And if it does, why cannot >> it create a symbol that is not in obarray? > > That's what the patch does. The patch uninterns a symbol after it's interned in the obarray. I think the question is, why put the symbol in the obarray in the first place? Just a C static variable would do (although this would require an additional (trivial) C function, to use with record_unwind_protect instead of specbind). See for example Vloads_in_progress. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 19 11:54:09 2019 Received: (at 31676) by debbugs.gnu.org; 19 Apr 2019 15:54:09 +0000 Received: from localhost ([127.0.0.1]:44516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHVq4-0005FM-Uh for submit@debbugs.gnu.org; Fri, 19 Apr 2019 11:54:09 -0400 Received: from mail-ot1-f53.google.com ([209.85.210.53]:40575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHVq3-0005Ew-C0 for 31676@debbugs.gnu.org; Fri, 19 Apr 2019 11:54:07 -0400 Received: by mail-ot1-f53.google.com with SMTP id t8so4659272otp.7 for <31676@debbugs.gnu.org>; Fri, 19 Apr 2019 08:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4gZK3jdpN9trHd0zGoiQ8R+UDOl+LHw1S2jUD31W2Xw=; b=WPJXSUp9e3Zm1zU6+CeSum8+dzzJzP+o5HNuarbssQwMNGmEIR5WPG7jnRYBQVv60L JPWy7XauxQwOAm05kWGPKEOArY7rLBZjz7YfWBMqOh6sHaX7elDjocaeuQa6LqvSGp0C syoIrETxvEu8ldyKMFpoIACpS7skiqhUCyRTzc6bn+11unwdZDgqfv6mI/h1OWq+heT+ Q+ME28yO+dDoeQEI/l5fW0GGYfe350gY+pEzvKxmXFS4XNfPL72g+gSEeNsaeCwifhEA lfScvgziFzVNRBhghbDFnynWpQmMSywEpyvwWeQMpv6UrsBsBZBef05Exi8WXCFgRgxx 146g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4gZK3jdpN9trHd0zGoiQ8R+UDOl+LHw1S2jUD31W2Xw=; b=A92g+/aTY9OxGOhiCDXgDRvvP0JXU4LFqDX1ityhFMzfwFIHpRFr7TuF9LI61v+1tw 8EA22zJ969SDjlxxuNS+dSxuw64tMXKZYkGtYHIShxZbE36FAGH7+zWM1vhDh8HQ7VE3 eyyhod892tqVR596+2kNLG9H5g2/s36h9n+D3gb7s4+7g2xNV9Z7n1WVFeVlv9ghtvRA oF2wcvT8KES/ZfLmu4jMcCiYSILE0/QZIDJ19hpG9MPrqxyQmRNUIYXTFTBw9Bv3hA4H UJkWu+R/kwwFJdwOQ3YHrZquUbJj6PjwpidoqjKuWIQaVvFpKTsktRVHZWRlt+zT7r94 dPBw== X-Gm-Message-State: APjAAAWmuUH20/SJMKiCm9+twDB2+tkOVSeLoWdDKK3Rn3E8sddg4mRs kplnpFSAbDzGU7B/Ed1KkPbwV6NLGFiJs9ulwJI= X-Google-Smtp-Source: APXvYqxL1H31aHdBC7t8/vLwxuvd3dX1IlM8yiQYpvdZUUOi9J+wkXH1FchjxPYKmyq7Xko1bGJmfVqCek3ORW4+fh8= X-Received: by 2002:a05:6830:1559:: with SMTP id l25mr2563715otp.355.1555689241251; Fri, 19 Apr 2019 08:54:01 -0700 (PDT) MIME-Version: 1.0 References: <837en9uyaq.fsf@gnu.org> <83k1r7sw7m.fsf@gnu.org> <87tveuusng.fsf@gmail.com> In-Reply-To: <87tveuusng.fsf@gmail.com> From: Philipp Stephani Date: Fri, 19 Apr 2019 17:53:50 +0200 Message-ID: Subject: Re: bug#31676: 27.0.50; More helpful error message for unescaped character literals To: Noam Postavsky Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 31676 Cc: Eli Zaretskii , Lars Ingebrigtsen , 31676@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Am Fr., 19. Apr. 2019 um 13:43 Uhr schrieb Noam Postavsky : > > Philipp Stephani writes: > > >> > The function uses an uninterned variable, so it has to be in C. I think that's slightly better than interning the > >> > variable and having some Lisp function access it (the latter would have one additional internal symbol). > > >> Why does it need an uninterned variable? > > > > It doesn't need to be uninterned, but it's cleaner that way because no > > other code can access the variable. > > > >> And if it does, why cannot > >> it create a symbol that is not in obarray? > > > > That's what the patch does. > > The patch uninterns a symbol after it's interned in the obarray. I > think the question is, why put the symbol in the obarray in the first > place? Just a C static variable would do (although this would require > an additional (trivial) C function, to use with record_unwind_protect > instead of specbind). See for example Vloads_in_progress. > Ah, I see. There's no specific reason for this specific implementation, it's just the simplest one. Since we have a few cases where we need uninterned variables/functions (I see 6 existing calls to unintern in the C source code), how about extending DEFVAR/defsubr to allow uninterned symbols? That would make the implementation of these cases more obvious. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 19 12:34:07 2019 Received: (at 31676) by debbugs.gnu.org; 19 Apr 2019 16:34:07 +0000 Received: from localhost ([127.0.0.1]:44545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHWSk-0006SC-Mt for submit@debbugs.gnu.org; Fri, 19 Apr 2019 12:34:06 -0400 Received: from mail-ot1-f41.google.com ([209.85.210.41]:34918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHWSi-0006Rh-Un for 31676@debbugs.gnu.org; Fri, 19 Apr 2019 12:34:05 -0400 Received: by mail-ot1-f41.google.com with SMTP id m10so4766897otp.2 for <31676@debbugs.gnu.org>; Fri, 19 Apr 2019 09:34:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vo0G6dA9HEzl1mGZt1E0ewIX5KRzB2Y++vRRBuChww8=; b=sUB/zDvvSp7XhAxZmIvRH4+UVy2swxOd2G3MWPyMmLfloodugh6OcNB/M6+CbVuw78 2x8Bfl/mxW2xu6rHxT6DW9/mPLEmFX3YTqhFh94HjDto9J8Cw//iO5U4QtZgH7nf4UkI JSzfrpJs1txrQdvltIdGOo0jslB44RfniaUbXCm4f5P87sOwWbJ8j48guc6e9vnQOxH9 vABsFN7zwMCXFdybROsGX/VTvx10coXHPC9LRSaCsWQaMzJluvawtRKHgABI7N88bgd+ xTuNuFpDc2BQJvDv5bpt0OhnlZZsMOPOg/E6Xn209HQKyKMG9r66gx/fbYTsq3MZS+n3 5mxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vo0G6dA9HEzl1mGZt1E0ewIX5KRzB2Y++vRRBuChww8=; b=CDs1Jcz+G+af/n9qykH1FCIhCACwT0NYxgZNOj8pWZr0II2CtjlM5JV3ZCBvjtuN82 6yPfLVIgWN4AS9ZjHabfbHQ2KLjs4UT8/fbgrs64tBpU0CaPeSN+FLJDsNytJN3P+wpK PZ8vdcl7QBMhRO6S82EHe8YPCFSL16J+QS6Cgr+xq8vOjEdy+CU49vlQjkloLwFGYAfh xKOA54QlsbTnmIwuz9XDTIPArnm4SOfua1BoR7BjINAvuUuohvQBcSDo+IvOgKfFcdmr 55pvw2ZSCcRFFIfRU9kczod4PerdorfIFGumxFeEa8ocX/eEDLdkXRF+IKOk5Jrc1rGd XTTA== X-Gm-Message-State: APjAAAUoUJIzP4tFC9bcJWVD3rnWxCGL7j10uFLhtY6TAsr4zCF0Qe8J y1qVWUKxCeUDPZLB2aJHhCxTtPVddj2PSvq/0D8= X-Google-Smtp-Source: APXvYqzo39gyoNWgjJMkwQQlAIVhxJrwf5bgn9wKzL74iMAQ8ZJcnbiDdG+F/oq1DWnORK4yazu+8fvI0RncAjdQqso= X-Received: by 2002:a9d:7616:: with SMTP id k22mr2628374otl.51.1555691638912; Fri, 19 Apr 2019 09:33:58 -0700 (PDT) MIME-Version: 1.0 References: <837en9uyaq.fsf@gnu.org> <83k1r7sw7m.fsf@gnu.org> <87tveuusng.fsf@gmail.com> In-Reply-To: From: Philipp Stephani Date: Fri, 19 Apr 2019 18:33:47 +0200 Message-ID: Subject: Re: bug#31676: 27.0.50; More helpful error message for unescaped character literals To: Noam Postavsky Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 31676 Cc: Eli Zaretskii , Lars Ingebrigtsen , 31676@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Am Fr., 19. Apr. 2019 um 17:53 Uhr schrieb Philipp Stephani : > > Am Fr., 19. Apr. 2019 um 13:43 Uhr schrieb Noam Postavsky : > > > > Philipp Stephani writes: > > > > >> > The function uses an uninterned variable, so it has to be in C. I think that's slightly better than interning the > > >> > variable and having some Lisp function access it (the latter would have one additional internal symbol). > > > > >> Why does it need an uninterned variable? > > > > > > It doesn't need to be uninterned, but it's cleaner that way because no > > > other code can access the variable. > > > > > >> And if it does, why cannot > > >> it create a symbol that is not in obarray? > > > > > > That's what the patch does. > > > > The patch uninterns a symbol after it's interned in the obarray. I > > think the question is, why put the symbol in the obarray in the first > > place? Just a C static variable would do (although this would require > > an additional (trivial) C function, to use with record_unwind_protect > > instead of specbind). See for example Vloads_in_progress. > > > > Ah, I see. There's no specific reason for this specific > implementation, it's just the simplest one. > Since we have a few cases where we need uninterned variables/functions > (I see 6 existing calls to unintern in the C source code), how about > extending DEFVAR/defsubr to allow uninterned symbols? That would make > the implementation of these cases more obvious. Thinking about this a bit more, I think the overhead of your approach for most uninterned symbols (a static variable + staticpro) is small enough to not warrant further complex DEF* macros, so I'll switch the existing uses to that. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 19 13:22:23 2019 Received: (at 31676-done) by debbugs.gnu.org; 19 Apr 2019 17:22:23 +0000 Received: from localhost ([127.0.0.1]:44565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHXDS-0007ge-QS for submit@debbugs.gnu.org; Fri, 19 Apr 2019 13:22:23 -0400 Received: from mail-ot1-f47.google.com ([209.85.210.47]:39305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHXDQ-0007gP-Sd for 31676-done@debbugs.gnu.org; Fri, 19 Apr 2019 13:22:21 -0400 Received: by mail-ot1-f47.google.com with SMTP id f10so4835271otb.6 for <31676-done@debbugs.gnu.org>; Fri, 19 Apr 2019 10:22:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b6GXKY8KX2iAAKD4+5rPNTbABxNceoB9gycCke5q4EY=; b=OkxfHi1z3n464W7A1UiTz8h2+DAHBOOQCjdl8mcu0zgjXHVGXpnrBcgSMVT1GBg220 /AyhyKyToFY6EkVQLw++WKCtQzeGgP9yQrpNLL2naK24Gf3dHF3nls46UtMBUR3gWe3v ZYu0hXD4BKiMuI4p43VRsiez3QmMbsgl2AfJ5ZiHDXa3mpm55DFfQfmsjJuQ3Fr788wY /qrXvXhg4cgYjXXPV8tanqe9Iage1D8eL4DJnwxoQSxecc7QywPosNy1sAXR7als+152 cLsEzJqMQs/2pQ1Dyp/PMnHZuWz57Ft/VwU9R+TviiJkWgTRpDuOmsPGsbllIHCSXjnz 50wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b6GXKY8KX2iAAKD4+5rPNTbABxNceoB9gycCke5q4EY=; b=lWolyWxCUlXKeWudEAVPp2QVCBKKV1/8f9S8YyUPjO8UfYvQzJzU0fo0pnKoB3ekkq lkUX+axh25ZRId0jUuLkLLYrmzKOHNYz75Npd+a9GgixeRboWaYahbsVBP5WS/emE0yU LnkfvvPBaC06xZix30Z0UX88IVjA1+Wp30FGgxP4D5oQsEhj9px/UXtsCnWBcdjUbrvp +AtQTHB8sygj8HrF+zCuPAMtnwAttFIgZY7fNRoWTKAv51sRK3tokxCWtWwRtK0bAI4m FrP+sFd86TuI0m7sKqlTgOgngXA3GsAv6RB6g+068n1wRffXSqKEZnuxLjem7xDv7Xcj nIUA== X-Gm-Message-State: APjAAAXlwDM7fiNaypF1tcMI7VkHf61sW3iOkU9G7tkEdClN8thBWRFi x5l5v55sbf+Ij8sSMt5ZPEcSMr5l74fuDX9zSu4= X-Google-Smtp-Source: APXvYqzdR0l0PGoSPaYBL5IKzqjR0ijdV92cVD5gyR7iW9rsIKOSBCF49gnbXwPuwiF56CtRcySjnLFWihDpd1QSUx8= X-Received: by 2002:a05:6830:15d2:: with SMTP id j18mr2680704otr.37.1555694534732; Fri, 19 Apr 2019 10:22:14 -0700 (PDT) MIME-Version: 1.0 References: <837en9uyaq.fsf@gnu.org> In-Reply-To: From: Philipp Stephani Date: Fri, 19 Apr 2019 19:22:03 +0200 Message-ID: Subject: Re: bug#31676: 27.0.50; More helpful error message for unescaped character literals To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 31676-done Cc: Lars Ingebrigtsen , 31676-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Am Sa., 9. Juni 2018 um 19:12 Uhr schrieb Philipp Stephani : > > > > Eli Zaretskii schrieb am Fr., 8. Juni 2018 um 16:51 Uhr: >> >> > Date: Sat, 2 Jun 2018 12:00:26 +0200 >> > Cc: 31676@debbugs.gnu.org >> > >> > Sounds reasonable, here's a patch. >> > >> > From 4bd8348753980be95dc4bcba47e52f7f79255fb6 Mon Sep 17 00:00:00 2001 >> > From: Philipp Stephani >> > Date: Sat, 2 Jun 2018 11:59:02 +0200 >> > Subject: [PATCH] Make warning about unescaped character literals more helpful. >> > >> > See Bug#31676. >> > >> > * src/lread.c (Flread_unescaped_character_literals_warning): New >> > defun. >> > (load_warn_unescaped_character_literals): Use it. >> > (syms_of_lread): Define new defun. Unintern internal >> > variable, which is not used any more outside of lread.c >> > >> > * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Use new >> > defun. >> > >> > * test/src/lread-tests.el (lread-tests--unescaped-char-literals): >> > test/lisp/emacs-lisp/bytecomp-tests.el >> > (bytecomp-tests--unescaped-char-literals): Adapt unit tests. >> >> Sounds okay, but can you tell why you implemented >> lread--unescaped-character-literals in C? If that's because you need >> to call it from load_warn_unescaped_character_literals, then C >> functions can call Lisp functions with no problems, we have several >> examples of that in the sources. AFAICT, the C implementation is just >> a "transliteration" of straightforward Lisp code, so it reads strange. > > > The function uses an uninterned variable, so it has to be in C. I think that's slightly better than interning the variable and having some Lisp function access it (the latter would have one additional internal symbol). However, your point about the C function being strange is valid. I've reimplemented it in Lisp now and pushed commit 0b4b380ce4 to master. From unknown Fri Aug 15 04:07:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 18 May 2019 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator