all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* distinguish .h files
@ 2010-10-20 15:37 Andrea Crotti
  2010-10-20 15:48 ` Lennart Borgman
  0 siblings, 1 reply; 18+ messages in thread
From: Andrea Crotti @ 2010-10-20 15:37 UTC (permalink / raw)
  To: help-gnu-emacs


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




^ permalink raw reply	[flat|nested] 18+ messages in thread
[parent not found: <mailman.0.1287589050.20659.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2010-10-21 15:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-20 15:37 distinguish .h files Andrea Crotti
2010-10-20 15:48 ` Lennart Borgman
2010-10-21  9:23   ` Oleksandr Gavenko
2010-10-21 10:37     ` Tassilo Horn
2010-10-21 10:43       ` Tassilo Horn
2010-10-21 11:04       ` Andrea Crotti
2010-10-21 12:53       ` Oleksandr Gavenko
2010-10-21 12:56         ` Oleksandr Gavenko
2010-10-21 12:56         ` Andrea Crotti
2010-10-21 13:31           ` Oleksandr Gavenko
2010-10-21 13:42             ` Andrea Crotti
     [not found]             ` <mailman.1.1287669068.3931.help-gnu-emacs@gnu.org>
2010-10-21 13:58               ` Pascal J. Bourguignon
2010-10-21 13:46           ` Tassilo Horn
2010-10-21 14:47             ` Andrea Crotti
2010-10-21 15:21               ` Tassilo Horn
     [not found]   ` <mailman.0.1287653038.19033.help-gnu-emacs@gnu.org>
2010-10-21 10:15     ` Pascal J. Bourguignon
     [not found] <mailman.0.1287589050.20659.help-gnu-emacs@gnu.org>
2010-10-20 15:55 ` Richard Riley
2010-10-20 16:46 ` Juhapekka Tolvanen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.