emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: /lib/cpp not found in c-mode


From: Nick Roberts
Subject: Re: /lib/cpp not found in c-mode
Date: Tue, 3 May 2005 09:30:14 +1200

Stefan Monnier writes:
 > >> 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.

It uses call-process through a shell now and discards standard error so if
gcc is not available no define list is generated. How would condition-case
help?

 > And AFAICT the result is completely unused unless you happen to also use
 > gud-tooltips.

Thats currently true. However, tooltips could be used to display the #define
directives when just source browsing i.e. they don't need GUD.

 > 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).

I could do it at the same time that I check whether existing or new buffers
require gud-minor-mode to be set.

 > 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.

I see no reason now for an error to occur but, if we only use this feature
with GUD, it clearly is more efficient to only activate for buffers that are
part of the session.

Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]