all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Fix to handling of C++ digit separators, improvements in handling of single quotes.
@ 2017-07-01 16:10 Alan Mackenzie
  2017-07-02  3:35 ` Noam Postavsky
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Mackenzie @ 2017-07-01 16:10 UTC (permalink / raw)
  To: emacs-devel

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).



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-02 15:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-01 16:10 Fix to handling of C++ digit separators, improvements in handling of single quotes Alan Mackenzie
2017-07-02  3:35 ` Noam Postavsky
2017-07-02  6:03   ` Alan Mackenzie
2017-07-02 13:05   ` Alan Mackenzie
2017-07-02 15:47     ` Noam Postavsky

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.