C++: detect c++ .h header files
This commit is contained in:
parent
b42cee267d
commit
dd3d51e750
1 changed files with 12 additions and 6 deletions
|
@ -59,12 +59,18 @@
|
||||||
ad-do-it))))
|
ad-do-it))))
|
||||||
|
|
||||||
(progn ;; Obj-C
|
(progn ;; Obj-C
|
||||||
(add-to-list 'magic-mode-alist
|
(push `(,(lambda ()
|
||||||
`(,(lambda ()
|
(and (f-ext? buffer-file-name "h")
|
||||||
(and (string= (file-name-extension buffer-file-name) "h")
|
|
||||||
(re-search-forward "@\\<interface\\>"
|
(re-search-forward "@\\<interface\\>"
|
||||||
magic-mode-regexp-match-limit t)))
|
magic-mode-regexp-match-limit t)))
|
||||||
. objc-mode)))
|
. objc-mode)
|
||||||
|
magic-mode-alist)
|
||||||
|
|
||||||
|
(push `(,(lambda ()
|
||||||
|
(and (f-ext? buffer-file-name "h")
|
||||||
|
(f-exists? (f-swap-ext buffer-file-name "cpp"))))
|
||||||
|
. c++-mode)
|
||||||
|
magic-mode-alist))
|
||||||
|
|
||||||
(use-package irony
|
(use-package irony
|
||||||
:config
|
:config
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue