From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Josh Varner Newsgroups: gmane.emacs.devel Subject: Re: /lib/cpp not found in c-mode Date: Wed, 4 May 2005 14:04:40 -0500 Message-ID: <92a5eb4705050412045d89ddbe@mail.gmail.com> References: <17013.26868.207510.370151@farnswood.snap.net.nz> <17013.52411.51878.781739@farnswood.snap.net.nz> <17014.39042.74353.677362@farnswood.snap.net.nz> Reply-To: Josh Varner NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1115249594 25256 80.91.229.2 (4 May 2005 23:33:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 May 2005 23:33:14 +0000 (UTC) Cc: nickrob@snap.net.nz, jan.h.d@swipnet.se, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 05 01:33:11 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DTTLq-0006hK-Pn for ged-emacs-devel@m.gmane.org; Thu, 05 May 2005 01:32:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTTTF-0008PA-Pc for ged-emacs-devel@m.gmane.org; Wed, 04 May 2005 19:40:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DTPIK-0006hq-H5 for emacs-devel@gnu.org; Wed, 04 May 2005 15:12:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DTPIJ-0006hQ-Qd for emacs-devel@gnu.org; Wed, 04 May 2005 15:12:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTPIJ-0006dH-3C for emacs-devel@gnu.org; Wed, 04 May 2005 15:12:27 -0400 Original-Received: from [64.233.162.205] (helo=zproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DTPM7-0006Df-BW for emacs-devel@gnu.org; Wed, 04 May 2005 15:16:23 -0400 Original-Received: by zproxy.gmail.com with SMTP id 40so519626nzk for ; Wed, 04 May 2005 12:11:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Kfn2CZn0qxOdvBuhXEWAN9iEtGk8kDDGnuGDyeI+rw2gZA1V5UbqhBwI2JQ/qXyqxp3CrReJvNrJaJ5sGZDn4WK/+fhninCENz7Q57F6Pe+iP2DsVDfTOa6Vzx44wIFXa8gvQSGt1JShNtOemC8qhtRk7/fW1p4aOwTLf/tZp1Q= Original-Received: by 10.36.84.10 with SMTP id h10mr132824nzb; Wed, 04 May 2005 12:04:40 -0700 (PDT) Original-Received: by 10.36.115.17 with HTTP; Wed, 4 May 2005 12:04:40 -0700 (PDT) Original-To: Stefan Monnier In-Reply-To: Content-Disposition: inline X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36669 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36669 On 5/3/05, Stefan Monnier wrote: > > Don't know about others, but the reason why I don't use c-macro-exp= and > > is because it basically can't work right without parsing my > > Makefile(s) to know which include dirs should be used. And since i= t > > doesn't do that, I've found it of little use. >=20 > > What information would it need in order to DTRT for you? >=20 . . . > Of course I can also manually take the relevant info from the Makefile an= d > put it into c-macro-cppflags, but doing that for each and every project > I work on is just too much trouble for me to even try it. >=20 Assuming you do your compiles from emacs you should have the full command lines used to compile the sources, i.e. containing all of the relevant -I and -D's. Could a function be used to grab this information out of the compilation buffers and store it for use by c-macro-expand? If this was automated in such a way that you could have an association between files, or groups of files and the options used by c-macro-expand, a hook in the compilation buffer could grab that information during each build for later use. That would give you the flexibility without the tedium. Josh