summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/ert-x.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2019-07-16 20:01:12 +0000
committerAlan Mackenzie <acm@muc.de>2019-07-16 20:01:12 +0000
commit585fb957399f21a93cbfabd182b76262466797e3 (patch)
tree3b3656706b56b771b316e5fb159f231688e4713b /lisp/emacs-lisp/ert-x.el
parentd2758820cd45733570c704431da3f3e91dbb8605 (diff)
downloademacs-585fb957399f21a93cbfabd182b76262466797e3.tar.gz
emacs-585fb957399f21a93cbfabd182b76262466797e3.tar.bz2
emacs-585fb957399f21a93cbfabd182b76262466797e3.zip
CC Mode: allow bogusly "adjacent" double quote marks to pair up syntactically
For this introduce the text property c-fl-syn-tab to "mirror" syntax-table. * lisp/progmodes/cc-defs.el (c-is-escaped, c-will-be-escaped, c-put-syn-tab) (c-clear-syn-tab, c-clear-syn-tab-properties, c-with-extended-string-fences): new macros. (c-point): Use c-is-escaped (c-search-forward-char-property, c-search-backward-char-property) (c-search-forward-char-property-with-value-on-char) (c-search-forward-char-property-without-value-on-char): Fix regexp error involving \n. * lisp/progmodes/cc-engine.el (c-semi-pp-to-literal): User c-with-extended-string-fences around a parse-partial-sexp. (c-full-get-near-cache-entry): Fix an off-by-one error. (c-full-pp-to-literal): Avoid writing duplicate entries into a cache. (c-after-change-unmark-raw-strings): Use c-clear-syn-tab-properties. * lisp/progmodes/cc-mode.el (c-leave-cc-mode-mode): Clear the c-fl-syn-tab properties, too. (c-basic-common-init): Mark c-fl-syn-tab as a non-sticky text property. (c-depropertize-new-text): Also handle c-fl-syn-tab. (c-multiline-string-check-final-quote, c-parse-quotes-after-change): Use c-is-escaped. (c-fl-syn-tab-region): New variable. (c-clear-string-fences, c-restore-string-fences, c-remove-string-fences): New functions. (c-before-change-check-unbalanced-strings) (c-after-change-mark-abnormal-strings, c-after-change-escape-NL-in-string): Use the new functions and macros. (c-before-change, c-after-change, c-font-lock-fontify-region): Restore the syntax-table text properties from c-fl-syn-tab text properties for these functions. (c-electric-pair-inhibit-predicate): Test the c-fl-syn-tab property rather than syntax-table.
Diffstat (limited to 'lisp/emacs-lisp/ert-x.el')
0 files changed, 0 insertions, 0 deletions