GNU bug report logs - #32939
27.0.50; Don't reject confusable quotes, just fontify & mention them in error messages

Previous Next

Package: emacs;

Reported by: Noam Postavsky <npostavs <at> gmail.com>

Date: Thu, 4 Oct 2018 23:59:02 UTC

Severity: wishlist

Tags: fixed, patch

Found in version 27.0.50

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 32939 <at> debbugs.gnu.org
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
> From: Noam Postavsky <npostavs <at> gmail.com>
> Cc: 32939 <at> 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.




This bug report was last modified 5 years and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.