]> git.eshelyaron.com Git - emacs.git/commit
CC Mode: Handle C++20 modules
authorAlan Mackenzie <acm@muc.de>
Thu, 15 Sep 2022 19:54:22 +0000 (19:54 +0000)
committerAlan Mackenzie <acm@muc.de>
Thu, 15 Sep 2022 19:54:22 +0000 (19:54 +0000)
commita057d41c7577c0e7089dd259fd8edf75f636c7a1
tree673c6c6309057d448c2d36234b9cd6a6692f2c23
parent3c1579697ff03d3991b41ead503211cffac0998f
CC Mode: Handle C++20 modules

* lisp/progmodes/cc-engine.el (c-before-after-change-check-c++-modules): New
function.
(c-forward-<>-arglist): Add special handling for "import <...>".

* lisp/progmodes/cc-fonts.el (c-preprocessor-face-name): Add extra "fallback"
face after font-lock-reference-face, namely font-lock-constant-face.
(c-cpp-matchers): Don't fontify the <> delimiters for XEmacs in #include <..>.
(c-basic-matchers-before): Add c-font-lock-c++-modules to the C++ value.
(c-forward-c++-module-name, c-forward-c++-module-partition-name)
(c-font-lock-c++-modules): New functions.

* lisp/progmodes/cc-langs.el (c-get-state-before-change-functions)
(c-before-font-lock-functions): Include
c-before-after-change-check-c++-modules in the C++ value of these variables.
(c-module-name-re): New c-lang-const/var.
(c-other-decl-kwds): Add a C++ value "export".
(c-<>-sexp-kwds): Add a new component c-import-<>-kwds.
(c-import-<>-kwds, c-module-kwds): New c-lang-consts.
(c-module-key): New c-lang-const/var.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-fonts.el
lisp/progmodes/cc-langs.el