all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: emacs-devel@gnu.org
Subject: Fix to handling of C++ digit separators, improvements in handling of single quotes.
Date: Sat, 1 Jul 2017 16:10:08 +0000	[thread overview]
Message-ID: <20170701161008.GB8743@acm> (raw)

Hello, Emacs.

Up until half an hour ago, the handling of C++ digit separators (') was
broken.  They were find for when you'd just loaded a file, but on typing
in digits and separators they were broken.

I've rewritten this part of CC Mode, in the process improving the
handling of single quotes generally.  Now, single quotes are fontified
with font-lock-warning-face unless they form part of a valid character
constant, or are digit separators in C++.

Just as a matter of interest, single quotes inside strings and comments
now get the same syntax-table text properties that they do in plain text.
It's just simpler this way.

The code involved is moderately involved, with special cases needed to
handle things like '\'', '\\', or char foo [] = {',',',',',',','};.  So
if there are any problems with it (in particular, large areas of text
following a quotey bit getting misfontified with font-lock-string-face),
please let me know.

-- 
Alan Mackenzie (Nuremberg, Germany).



             reply	other threads:[~2017-07-01 16:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-01 16:10 Alan Mackenzie [this message]
2017-07-02  3:35 ` Fix to handling of C++ digit separators, improvements in handling of single quotes Noam Postavsky
2017-07-02  6:03   ` Alan Mackenzie
2017-07-02 13:05   ` Alan Mackenzie
2017-07-02 15:47     ` 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

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

  git send-email \
    --in-reply-to=20170701161008.GB8743@acm \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.