[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: distinguish .h files
From: |
Andrea Crotti |
Subject: |
Re: distinguish .h files |
Date: |
Thu, 21 Oct 2010 13:04:54 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) |
Tassilo Horn <tassilo@member.fsf.org> writes:
>
>
> This should do the trick:
>
> (defun c++-header-file-p ()
> "Return non-nil, if in a C++ header."
> (and (string-match "\\.h$"
> (or (buffer-file-name)
> (buffer-name)))
> (save-excursion
> (re-search-forward "\\_<class\\_>" nil t))))
>
> (add-to-list 'magic-mode-alist
> '(c++-header-file-p . c++-mode))
>
> Bye,
> Tassilo
Great it works perfectly, now I have to understand how the heck I can
make "gtags" understand c++ code...
But that's another story...
Instead, is not possible somehow that when I say
public class X : public Y {
}
I get all the needed declarations automatically.
I didn't find anything useful in CEDET about that, but maybe there is
something...
- distinguish .h files, Andrea Crotti, 2010/10/20
- 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 <=
- 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
- Re: distinguish .h files, Andrea Crotti, 2010/10/21
- Re: distinguish .h files, Tassilo Horn, 2010/10/21
- Re: distinguish .h files, Oleksandr Gavenko, 2010/10/21