emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CC Mode and GCC/CEDET integration for evaluating macros


From: Alan Mackenzie
Subject: Re: CC Mode and GCC/CEDET integration for evaluating macros
Date: Fri, 1 May 2015 18:11:35 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Oleh.

I'm speaking here for CC Mode, not CEDET.

On Fri, May 01, 2015 at 07:03:05PM +0200, Oleh Krehel wrote:

> Hi all,

> I just went through the whole CC Mode manual, just to make sure that I'm
> not being silly asking for an existing feature.

> I'd like to be able to evaluate the current symbolic constant at point
> with "C-x C-e" for C/C++.

There's nothing like that in CC Mode.  But there is c-macro-expand in
cmacexp.el which might have something like this, or be easily hackable to
something like this.

> Moreover, I remember when I was using Visual Studio 10 years ago, it
> had a feature of parsing the macros and graying out #ifdef branches. I
> found a screenshot of this if it's not clear what I mean:
> http://stackoverflow.com/questions/11610549/

There is hide-ifdef-mode in Emacs which does something similar - It makes
the "non-active" bits of #ifdef branches invisible rather than changing
their appearance.  Doubtless it would be easy enough to add the "greying
out" facility as an option.

> I think it would be really cool to add both these features to CC Mode.

I'm not sure CC Mode would be the best place for these.  hide-ifdef-mode
nd c-macro-expand already exist.  I suggest you look at these first.

> So I'd like to ask:

> 1. Is there any past progress towards these features?

> 2. How viable is it to implement them? Could they work for the most
> common build systems?

> 3. Could / should they be implemented based on CEDET or GCC?

> 4. How hard would it be to actually do it all? Are there any predictable
> roadblocks?

> 5. Would other people besides me find these features useful?

> Oleh

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]