diff options
author | Alan Mackenzie <acm@muc.de> | 2018-05-20 13:28:14 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2018-05-20 13:28:14 +0000 |
commit | bb591f139f0602af292c772f974dcc14dabb1deb (patch) | |
tree | f0c0c0a8d534a30cc841ea82d72a17a211f1f88d /lisp/emacs-lisp/cursor-sensor.el | |
parent | e2f68c144f83b4634096b8180ee9d5d56329a01d (diff) | |
download | emacs-bb591f139f0602af292c772f974dcc14dabb1deb.tar.gz emacs-bb591f139f0602af292c772f974dcc14dabb1deb.tar.bz2 emacs-bb591f139f0602af292c772f974dcc14dabb1deb.zip |
Enhance CC Mode's fontification, etc., of unterminated strings.
String delimiters, including escaped new lines, of correctly terminated
strings are left in font-lock-string-face. All others get
font-lock-warning-face. The latter get syntax-table text properties on the
opening string delim and the "terminating EOL".
Correct two miscellaneous bugs: the handling of text properties on Java Mode's
generic delimiters; the handling of c-just-done-before-change.
* lisp/progmodes/cc-defs.el (c-point): New position 'eoll "end of logical line".
(c-characterp): New macro.
* lisp/progmodes/cc-fonts.el (c-font-lock-invalid-string): Removed.
(c-basic-matchers-before): Use a simple matcher in place of the form around
c-font-lock-invalid-string.
* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Add
c-before-change-check-unbalanced-strings to the value for all modes except AWK
Mode. Also add c-before-change-check-<>-operators to Java Mode, correcting an
error in that mode's handling of generic delimiters.
(c-before-font-lock-functions): Add c-after-change-re-mark-unbalanced-strings
to the value for all modes except AWK Mode.
(c-single-quotes-quote-strings, c-string-delims): New lang variables for
future enhancements.
(c-string-innards-re-alist): New lang variable.
* lisp/progmodes/cc-mode.el (c-just-done-before-change): Do not set this
variable when a change is the alteration of text properties.
(c-basic-common-init): Set parse-sexp-lookup-properties (and the XEmacs
equivalent) also for Pike Mode.
(c-neutralize-CPP-line): No longer neutralize unbalanced quotes here.
(c-unescaped-nls-in-string-p, c-multiline-string-start-is-being-detached)
(c-pps-to-string-delim, c-before-change-check-unbalanced-strings)
(c-after-change-re-mark-unbalanced-strings): New functions.
(c-after-change): Fix a bug with the handling of c-just-done-before-change.
Diffstat (limited to 'lisp/emacs-lisp/cursor-sensor.el')
0 files changed, 0 insertions, 0 deletions