From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32939: 27.0.50; Don't reject confusable quotes, just fontify & mention them in error messages Date: Sat, 27 Oct 2018 12:48:47 +0300 Message-ID: <838t2joh34.fsf@gnu.org> References: <87lg7dmfhp.fsf@gmail.com> <83woqw235n.fsf@gnu.org> <877ei7m172.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1540633623 4588 195.159.176.226 (27 Oct 2018 09:47:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 27 Oct 2018 09:47:03 +0000 (UTC) Cc: 32939@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 27 11:46:59 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGLBL-00014b-0V for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Oct 2018 11:46:59 +0200 Original-Received: from localhost ([::1]:35804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGLDR-0003gd-I8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Oct 2018 05:49:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGLDL-0003gM-7p for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 05:49:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGLDK-0005SO-I0 for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 05:49:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40319) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gGLDK-0005SC-EC for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 05:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gGLDK-0008Ff-7u for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 05:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Oct 2018 09:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32939 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32939-submit@debbugs.gnu.org id=B32939.154063373731708 (code B ref 32939); Sat, 27 Oct 2018 09:49:02 +0000 Original-Received: (at 32939) by debbugs.gnu.org; 27 Oct 2018 09:48:57 +0000 Original-Received: from localhost ([127.0.0.1]:44577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGLDE-0008FM-U7 for submit@debbugs.gnu.org; Sat, 27 Oct 2018 05:48:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGLDC-0008F6-L6 for 32939@debbugs.gnu.org; Sat, 27 Oct 2018 05:48:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGLD3-0005Dc-BS for 32939@debbugs.gnu.org; Sat, 27 Oct 2018 05:48:49 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGLD3-0005DV-6R; Sat, 27 Oct 2018 05:48:45 -0400 Original-Received: from [176.228.60.248] (port=3534 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gGLD2-0006fK-Bn; Sat, 27 Oct 2018 05:48:45 -0400 In-reply-to: <877ei7m172.fsf@gmail.com> (message from Noam Postavsky on Wed, 24 Oct 2018 18:25:53 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:151665 Archived-At: > From: Noam Postavsky > Cc: 32939@debbugs.gnu.org > Date: Wed, 24 Oct 2018 18:25:53 -0400 > > >> As a followup from [1], here is a patchset which replaces the master's > >> current rejection of confusable quotes on `read', and instead adds a > >> hint to the error message when evaluating an expression with a > >> confusable quote leads to an error. > >> > >> And also highlight such quotes with warning-face. > > > > Thanks. If this is accepted, it will need documentation changes, > > including NEWS. > > I adjusted the first patch so it applies cleanly to more recent master, > and added a NEWS entry for the fontification. I'm not sure about what > other documentation we need though. I thought the error was documented in the ELisp manual, but I see now that it wasn't. So indeed, no changes besides NEWS seem to be required. However, perhaps we should mention this behavior in "Basic Char Syntax" and the related use of this face in "Faces for Font Lock". WDYT? > -(ert-deftest lread-tests--funny-quote-symbols () > - "Check that 'smart quotes' or similar trigger errors in symbol names." > - (dolist (quote-char > - '(#x2018 ;; LEFT SINGLE QUOTATION MARK > - #x2019 ;; RIGHT SINGLE QUOTATION MARK > - #x201B ;; SINGLE HIGH-REVERSED-9 QUOTATION MARK > - #x201C ;; LEFT DOUBLE QUOTATION MARK > - #x201D ;; RIGHT DOUBLE QUOTATION MARK > - #x201F ;; DOUBLE HIGH-REVERSED-9 QUOTATION MARK > - #x301E ;; DOUBLE PRIME QUOTATION MARK > - #xFF02 ;; FULLWIDTH QUOTATION MARK > - #xFF07 ;; FULLWIDTH APOSTROPHE > - )) > - (let ((str (format "%cfoo" quote-char))) > - (should-error (read str) :type 'invalid-read-syntax) > - (should (eq (read (concat "\\" str)) (intern str)))))) > - Should we replace this test by one that tests the fontification? Thanks.