unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Noam Postavsky <npostavs@gmail.com>
Cc: 32939@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	[thread overview]
Message-ID: <838t2joh34.fsf@gnu.org> (raw)
In-Reply-To: <877ei7m172.fsf@gmail.com> (message from Noam Postavsky on Wed, 24 Oct 2018 18:25:53 -0400)

> From: Noam Postavsky <npostavs@gmail.com>
> 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.





  reply	other threads:[~2018-10-27  9:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 23:58 bug#32939: 27.0.50; Don't reject confusable quotes, just fontify & mention them in error messages Noam Postavsky
2018-10-05  8:44 ` Eli Zaretskii
2018-10-24 22:25   ` Noam Postavsky
2018-10-27  9:48     ` Eli Zaretskii [this message]
2018-10-30  1:30       ` Noam Postavsky
2018-10-30  7:12         ` Eli Zaretskii
2019-11-17  8:42           ` Lars Ingebrigtsen
2019-11-27 19:42             ` Noam Postavsky
2019-11-28 23:25               ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838t2joh34.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=32939@debbugs.gnu.org \
    --cc=npostavs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).