mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
C++: detect c++ .h header files
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user