From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.devel Subject: CC Mode and GCC/CEDET integration for evaluating macros Date: Fri, 01 May 2015 19:03:05 +0200 Message-ID: <87k2wsi62e.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1430500630 15450 80.91.229.3 (1 May 2015 17:17:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 May 2015 17:17:10 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 01 19:17:03 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YoEYh-0001UJ-18 for ged-emacs-devel@m.gmane.org; Fri, 01 May 2015 19:17:03 +0200 Original-Received: from localhost ([::1]:54849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoEYg-0008Lp-8r for ged-emacs-devel@m.gmane.org; Fri, 01 May 2015 13:17:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoEXU-0006oB-9h for emacs-devel@gnu.org; Fri, 01 May 2015 13:15:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YoEQx-0004YB-PM for emacs-devel@gnu.org; Fri, 01 May 2015 13:09:07 -0400 Original-Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]:33097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoEQx-0004Y4-Ih for emacs-devel@gnu.org; Fri, 01 May 2015 13:09:03 -0400 Original-Received: by wgin8 with SMTP id n8so95771741wgi.0 for ; Fri, 01 May 2015 10:09:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=KkYPlalr2YNU0CG7FeSkleAQw6a+Nc45/Dcna33pPrg=; b=zkdNpoAIV6YPinWwYX0ZS3In2U5kZ52PfYJUGQtDEdChU8A5XYPoIrfzcIryZABISF BRG0ho4AiZEV4xstCHCDc16dYFvJhy5KLIlWvKVAr+0H8ZpzX+mmOGRWlPATt7FYXyAw Ab/LoCWxjrPyRw14xlzKHI0Z7TZ34jrNzdMPmdIFfVhdjEX4ZUjeoWMdhTsNrt4kkX/C Q+tf/xYhIwtiO/wQJ/TMko0FUx25eTB0PNMSahUf/BtUl76RFnlqtGb3Q2R+C81PzBCQ GPLKxv50sbORjRLgdnnjIa03FUamHh41P3FGrNUM2NbCJi1Gzaq7/wJQCjszi4CGsYoL 8KSg== X-Received: by 10.180.11.236 with SMTP id t12mr5418450wib.19.1430500142761; Fri, 01 May 2015 10:09:02 -0700 (PDT) Original-Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by mx.google.com with ESMTPSA id xb3sm8308799wjc.38.2015.05.01.10.09.01 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 01 May 2015 10:09:01 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186084 Archived-At: 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++. 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/ I think it would be really cool to add both these features to CC Mode. 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