emacs-devel
[Top][All Lists]
Advanced

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

Fix to handling of C++ digit separators, improvements in handling of sin


From: Alan Mackenzie
Subject: Fix to handling of C++ digit separators, improvements in handling of single quotes.
Date: Sat, 1 Jul 2017 16:10:08 +0000
User-agent: Mutt/1.7.2 (2016-11-26)

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 via email to

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