C++: detect c++ .h header files

This commit is contained in:
Henrik Lissner 2016-04-16 21:30:27 -04:00
parent b42cee267d
commit dd3d51e750

View file

@ -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