From: Alan Mackenzie <acm@muc.de>
To: Oleh Krehel <ohwoeowho@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: CC Mode and GCC/CEDET integration for evaluating macros
Date: Fri, 1 May 2015 18:11:35 +0000 [thread overview]
Message-ID: <20150501181135.GA6376@acm.fritz.box> (raw)
In-Reply-To: <87k2wsi62e.fsf@gmail.com>
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).
next prev parent reply other threads:[~2015-05-01 18:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-01 17:03 CC Mode and GCC/CEDET integration for evaluating macros Oleh Krehel
2015-05-01 18:11 ` Alan Mackenzie [this message]
2015-05-01 18:23 ` Oleh Krehel
2015-05-01 18:46 ` Eli Zaretskii
2015-05-01 18:52 ` Oleh Krehel
2015-05-01 19:30 ` Eli Zaretskii
2015-05-01 19:42 ` Oleh Krehel
2015-05-02 8:27 ` Eli Zaretskii
2015-05-02 9:07 ` Eli Zaretskii
2015-05-02 8:57 ` martin rudalics
2015-05-02 12:00 ` Oleh Krehel
2015-05-03 16:45 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150501181135.GA6376@acm.fritz.box \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=ohwoeowho@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).