diff options
author | Alan Mackenzie <acm@muc.de> | 2017-07-01 15:43:07 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2017-07-01 15:43:07 +0000 |
commit | 59d07875df9d44568d93a7517853e6a5ccaf1e5b (patch) | |
tree | ec96cf9039ad80fefc6756aee7fbddc05b44ae13 /test/lisp/emacs-lisp/tabulated-list-test.el | |
parent | e620bbe38ed5e3e2a77f01eac2814c01dfa41c2d (diff) | |
download | emacs-59d07875df9d44568d93a7517853e6a5ccaf1e5b.tar.gz emacs-59d07875df9d44568d93a7517853e6a5ccaf1e5b.tar.bz2 emacs-59d07875df9d44568d93a7517853e6a5ccaf1e5b.zip |
Make C++ digit separators work. Amend the handling of single quotes generally
Single quotes, even in strings and comments, are now marked with the
"punctuation" syntax-table property, except where they are validly bounding a
character literal. They are font locked with font-lock-warning-face except
where they are valid. This is done in C, C++, ObjC, and Java Modes.
* lisp/progmodes/cc-defs.el (c-clear-char-property-with-value-on-char-function)
(c-clear-char-property-with-value-on-char, c-put-char-properties-on-char): New
functions/macros.
* lisp/progmodes/cc-fonts.el (c-font-lock-invalid-single-quotes): New function.
(c-basic-matchers-before): invoke c-font-lock-invalid-single-quotes.
* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Remove
c-before-after-change-digit-quote from wherever it occurs. Insert
c-parse-quotes-before-change into the entries for the languages where it is
needed.
(c-before-font-lock-functions): Remove c-before-after-change-digit-quote from
wherever it occurs. Insert c-parse-quotes-after-change into the entries for
the languages which need it.
(c-has-quoted-numbers): New lang-defconst/-defvar.
* lisp/progmodes/cc-mode.el (c-before-after-change-digit-quote): Remove.
(c-maybe-quoted-number-head, c-maybe-quoted-number-tail)
(c-maybe-quoted-number): New defconsts.
(c-quoted-number-head-before-point, c-quoted-number-tail-after-point)
(c-quoted-number-straddling-point, c-parse-quotes-before-change)
(c-parse-quotes-after-change): New functions.
Diffstat (limited to 'test/lisp/emacs-lisp/tabulated-list-test.el')
0 files changed, 0 insertions, 0 deletions