From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: CC Mode and GCC/CEDET integration for evaluating macros Date: Sun, 03 May 2015 18:45:08 +0200 Message-ID: <55465094.8070308@gmx.at> References: <87k2wsi62e.fsf@gmail.com> <20150501181135.GA6376@acm.fritz.box> <55449173.3000200@gmx.at> <87h9rvgpef.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1430671568 13578 80.91.229.3 (3 May 2015 16:46:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 May 2015 16:46:08 +0000 (UTC) Cc: Alan Mackenzie , emacs-devel@gnu.org To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 03 18:45:59 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 1Yox1i-0004X1-Jc for ged-emacs-devel@m.gmane.org; Sun, 03 May 2015 18:45:58 +0200 Original-Received: from localhost ([::1]:59794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yox1i-0003bH-4W for ged-emacs-devel@m.gmane.org; Sun, 03 May 2015 12:45:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yox1C-0003LA-II for emacs-devel@gnu.org; Sun, 03 May 2015 12:45:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yox17-0003mz-CT for emacs-devel@gnu.org; Sun, 03 May 2015 12:45:26 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:51593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yox17-0003mu-2P for emacs-devel@gnu.org; Sun, 03 May 2015 12:45:21 -0400 Original-Received: from [91.113.2.114] ([91.113.2.114]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0LsTDk-1ZHf1D3FiS-011zD3; Sun, 03 May 2015 18:45:19 +0200 In-Reply-To: <87h9rvgpef.fsf@gmail.com> X-Provags-ID: V03:K0:kXIbzi7LEDKLdQ/DC2ZiI3cf4VM5RJJDiXEIcOXzrm7vsvAah5t ep1eHkkAlKLNUVcXl3l9hu8eNzYr6F91Zk9x8wvR4Vt25DyK0T1k03uRumXOyFb4zAZdADF oyNPIOnubQfpSTkqOM7SCP3ITW0ZLdzAThmRYh05MnUwVh3WxKOiJgH4N1ZhlJ+h5Sl5K8U IxjAFcaB/u0NrOHK/oJ3g== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.15.19 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:186162 Archived-At: > But it fails for this simple case (zero > includes, just from the top): > > #define IN 1 > #ifdef IN > double foo; > #endif > > Here, "double foo;" gets the shadow. I called `hide-ifdefs'. Funny. It doesn't get shadowed here. But I've never got around to make `hide-ifdef-mode' work reasonably with the Emacs code base. I suppose that I'd have to set up some definitions manually, then scan config.h and then scan the remaining header files in the order they were processed by the compiler. So if you could come up with a solution, this would be very much appreciated here. BTW, `hide-ifdef-mode' fails on my current config.h file with the trace below. martin Debugger entered--Lisp error: (error "Bad token in parenthesized expression: L") signal(error ("Bad token in parenthesized expression: L")) error("Bad token in parenthesized expression: %s" L) hif-factor() hif-muldiv-expr() hif-math() hif-logshift-expr() hif-comp-expr() hif-eq-expr() hif-logand-expr() hif-logxor-expr() hif-logior-expr() hif-and-expr() hif-or-expr() hif-expr() hif-expr() hif-exprlist() hif-factor() hif-muldiv-expr() hif-math() hif-logshift-expr() hif-comp-expr() hif-eq-expr() hif-logand-expr() hif-logxor-expr() hif-logior-expr() hif-and-expr() hif-or-expr() hif-expr() hif-exprlist() hif-factor() hif-muldiv-expr() hif-math() hif-logshift-expr() hif-comp-expr() hif-eq-expr() hif-logand-expr() hif-logxor-expr() hif-logior-expr() hif-and-expr() hif-or-expr() hif-expr() hif-exprlist() hif-parse-exp((hif-lparen hif-lparen __GNUC__ hif-conditional hif-defined __GNUC_STDC_INLINE__ hif-and __GNUC_STDC_INLINE__ hif-colon hif-lparen 199901 L hif-less-equal __STDC_VERSION__ hif-and hif-not hif-defined __HP_cc hif-and hif-not hif-lparen hif-defined __SUNPRO_C hif-and __STDC__ hif-rparen hif-rparen hif-rparen hif-and hif-not hif-defined _GL_EXTERN_INLINE_STDHEADER_BUG hif-rparen)) hif-canonicalize("\\(^\\| \\)[ ]*#[ ]*if\\(n?def\\)?[ ]+") hif-possibly-hide(nil) hide-ifdef-guts() hif-recurse-on(1099 58650) hif-possibly-hide(t) hide-ifdef-guts() hide-ifdefs() hide-ifdef-mode(toggle) funcall-interactively(hide-ifdef-mode toggle) call-interactively(hide-ifdef-mode record nil) command-execute(hide-ifdef-mode record) execute-extended-command(nil "hide-ifdef-mode" "hide-ifdef-mode") funcall-interactively(execute-extended-command nil "hide-ifdef-mode" "hide-ifdef-mode") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command)