unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Semantic: headers available in multiple modes
@ 2012-10-19  6:45 Miguel Guedes
  0 siblings, 0 replies; only message in thread
From: Miguel Guedes @ 2012-10-19  6:45 UTC (permalink / raw)
  To: help-gnu-emacs

How can semantic be set up so as to allow a header be made available in 
multiple modes?

For instance, how can (/usr/include/glib-2.0/) glib.h be made available 
in both c-mode as well as c++-mode?

I've the following lines in the el source executed at startup by .emacs:

(semantic-add-system-include "/usr/include/glib-2.0/" 'c++-mode)
(semantic-add-system-include "/usr/include/glib-2.0/" 'c-mode)
(semantic-add-system-include "/usr/include/glibmm-2.4/" 'c++-mode)

...and am trying to allow glib's headers to be available in both c and 
c++ modes. But am failing.

How can it be done?

Many thanks!

--------------
  Further info

In c-mode, semantic-c-describe-environment gives:

Include Path Summary:

   This file's system include path is:
     /usr/include
     /usr/lib/gcc/x86_64-linux-gnu/4.6/include/
     /usr/local/include/
     /usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed/
     /usr/include/x86_64-linux-gnu/
     /usr/include/


In c++-mode, semantic-c-describe-environment gives:

Include Path Summary:

   This file's system include path is:
     /usr/include/boost/
     /usr/include/glib-2.0/
     /usr/include/glibmm-2.4/
     /usr/include/gtk-3.0/
     /usr/include/gtkmm-3.0/
     /usr/include/libxml++-2.6/
     ~/prj/gtk-e/
     /usr/include/c++/4.6/
     /usr/include/c++/4.6/x86_64-linux-gnu/
     /usr/include/c++/4.6/backward/
     /usr/lib/gcc/x86_64-linux-gnu/4.6/include/
     /usr/local/include/
     /usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed/
     /usr/include/x86_64-linux-gnu/
     /usr/include/



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-19  6:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-19  6:45 Semantic: headers available in multiple modes Miguel Guedes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).