bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32939: 27.0.50; Don't reject confusable quotes, just fontify & menti


From: Eli Zaretskii
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 <address@hidden>
> Cc: address@hidden
> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]