[Top][All Lists]

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

Re: Semantic parser uses c-forward-conditional

From: Eric M. Ludlam
Subject: Re: Semantic parser uses c-forward-conditional
Date: Wed, 23 Sep 2009 07:22:56 -0400

On Wed, 2009-09-23 at 09:24 +0000, Alan Mackenzie wrote:
> Hi, Richard and Eric!
> On Wed, Sep 23, 2009 at 02:30:18AM -0400, Richard Stallman wrote:
> >     I'm not very keen on that, but how about this instead: a new defun
> >     c-forward-conditional-1 which does the same, except it doesn't push a
> >     mark, doesn't throw errors like "No following conditional at this
> >     level", and returns the final point, or nil?
> > Since that would be meant as a command for other programs to use,
> > and not merely a subroutine, it would be better to give it a name
> > that fits.
> Um, well, thanks for the suggestion.  ;-)
> How about `c-scan-conditionals', since the function does the same as
> scan-lists, more or less?  Actually, more, since it moves point to the
> end position, unlike scan-lists.  Maybe the new c-scan-conditionals
> shouldn't move point?
> Eric, what do you think?

For your reference, here is the file in which I use
c-forward-conditional, and any other c specific functions:


It would not greatly affect my code if some new function moved the
point, or just returned where the end is.  In
semantic-c-skip-conditional-section it is trying to do more than just
skip a conditional.  It is trying to skip only parts of a conditional,
and allow other parts to be analyzed regularly.  (ie - execute the
effects of the preprocessor.)  The c-forward-conditional call is used on
nested ifs so I don't have to deal with the balancing of the conditional

For all I know, there may be some additional cc-mode features I could
take advantage of to help solve this problem.


reply via email to

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