[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
distinguish .h files
From: |
Andrea Crotti |
Subject: |
distinguish .h files |
Date: |
Wed, 20 Oct 2010 17:37:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) |
It's a bit annoying that the header files .h BUT for c++ are not
automatically recognized (but of course understandable).
I tried the following approach but it doesn't work, maybe the function
is executed too early?
Or what else can be the problem?
--8<---------------cut here---------------start------------->8---
(defun is-cpp-header-file ()
"enable c++-mode when finding classes"
(when (re-search-forward "class ")
(c++-mode)))
;;(add-hook 'c-mode-common-hook 'is-cpp-header-file)
--8<---------------cut here---------------end--------------->8---
- distinguish .h files,
Andrea Crotti <=
- Re: distinguish .h files, Lennart Borgman, 2010/10/20
- Re: distinguish .h files, Oleksandr Gavenko, 2010/10/21
- Re: distinguish .h files, Tassilo Horn, 2010/10/21
- Re: distinguish .h files, Tassilo Horn, 2010/10/21
- Re: distinguish .h files, Andrea Crotti, 2010/10/21
- Re: distinguish .h files, Oleksandr Gavenko, 2010/10/21
- Re: distinguish .h files, Andrea Crotti, 2010/10/21
- Re: distinguish .h files, Oleksandr Gavenko, 2010/10/21
- Re: distinguish .h files, Andrea Crotti, 2010/10/21
- Re: distinguish .h files, Tassilo Horn, 2010/10/21