This repository has been archived by the owner on Apr 18, 2022. It is now read-only.
forked from emacs-mirror/emacs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Alan Mackenzie
committed
May 20, 2018
1 parent
e2f68c1
commit bb591f1
Showing
4 changed files
with
279 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.