Merge pull request #1202 from flatwhatson/cpp-default-header

Restore C/C++ default-header-file-mode support
This commit is contained in:
Henrik Lissner 2019-02-26 12:14:30 -05:00 committed by GitHub
commit 43c8536a72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,9 +70,9 @@ preceded by the opening brace or a comma (disregarding whitespace in between)."
"\\|[-+] ([a-zA-Z0-9_]+)"
"\\)")))
(objc-mode))
((fboundp 'c-or-c++-mode) ; introduced in Emacs 26.1
(c-or-c++-mode))
((+cc--re-search-for ; TODO Remove this along with Emacs 25 support
;; NOTE c-or-c++-mode was introduced in Emacs 26.1, but it doesn't
;; support specification of a default/fallback mode
((+cc--re-search-for
(let ((id "[a-zA-Z0-9_]+") (ws "[ \t\r]+") (ws-maybe "[ \t\r]*"))
(concat "^" ws-maybe "\\(?:"
"using" ws "\\(?:namespace" ws "std;\\|std::\\)"