From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: /lib/cpp not found in c-mode Date: Mon, 02 May 2005 11:44:19 -0400 Message-ID: References: <01c54e8b$Blat.v2.4$b7e84380@zahav.net.il> <17013.33421.228027.508547@farnswood.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1115050163 11105 80.91.229.2 (2 May 2005 16:09:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 May 2005 16:09:23 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 02 18:09:21 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DSdSy-0004xW-QG for ged-emacs-devel@m.gmane.org; Mon, 02 May 2005 18:08:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSdZu-00020X-Fg for ged-emacs-devel@m.gmane.org; Mon, 02 May 2005 12:15:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DSdYi-0001h5-Ke for emacs-devel@gnu.org; Mon, 02 May 2005 12:14:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DSdYh-0001gV-Mt for emacs-devel@gnu.org; Mon, 02 May 2005 12:14:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSdSx-0008G1-SB for emacs-devel@gnu.org; Mon, 02 May 2005 12:08:15 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DSdAH-0008O5-M0; Mon, 02 May 2005 11:48:57 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 1245A340010; Mon, 2 May 2005 11:44:24 -0400 (EDT) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id A699E4AC223; Mon, 2 May 2005 11:44:19 -0400 (EDT) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 8F53BE6C18; Mon, 2 May 2005 11:44:19 -0400 (EDT) Original-To: Nick Roberts In-Reply-To: <17013.33421.228027.508547@farnswood.snap.net.nz> (Nick Roberts's message of "Mon, 2 May 2005 13:29:49 +1200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.838, requis 5, autolearn=not spam, AWL 0.06, BAYES_00 -4.90) X-MailScanner-From: monnier@iro.umontreal.ca 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:36582 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36582 >> Not only that, it IMHO shouldn't call "/lib/cpp" unconditionally, but >> rather try several possible file commands, including "gcc -E", "cpp" >> (without leading directories), etc. > Hopefully, it fails gracefully now. I use "gcc -E -dM -" now to generate a > define list. Have you any ideas to make it more general? gcc might not be available either. And the file may not be local (it may be accessed via Tramp or jka-compr). I.e. "fails gracefully" can't be obtained without a condition-case. And AFAICT the result is completely unused unless you happen to also use gud-tooltips. You'd be better served postponing execution of such a command to the moment when it's actually needed (i.e. when gud-tooltips are actually being used). If the user gets an error when she uses gud-tooltips, he won't mind, but if she gets the error about something that she won't even ever use, she has reasons to be upset. Stefan