From: "Eric M. Ludlam" <eric@siege-engine.com>
To: Alan Mackenzie <acm@muc.de>
Cc: cyd@stupidchicken.com, "Eric M. Ludlam" <zappo@gnu.org>,
Richard Stallman <rms@gnu.org>,
emacs-devel@gnu.org
Subject: Re: Semantic parser uses c-forward-conditional
Date: Wed, 23 Sep 2009 07:22:56 -0400 [thread overview]
Message-ID: <1253704976.10118.101.camel@projectile.siege-engine.com> (raw)
In-Reply-To: <20090923092432.GA2372@muc.de>
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:
http://cedet.cvs.sourceforge.net/viewvc/*checkout*/cedet/cedet/semantic/bovine/semantic-c.el
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
commands.
For all I know, there may be some additional cc-mode features I could
take advantage of to help solve this problem.
Eric
next prev parent reply other threads:[~2009-09-23 11:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-21 19:19 Semantic parser uses c-forward-conditional Chong Yidong
2009-09-21 19:21 ` Chong Yidong
2009-09-22 10:57 ` Alan Mackenzie
2009-09-22 11:43 ` Eric M. Ludlam
2009-09-22 22:08 ` Alan Mackenzie
2009-09-23 6:30 ` Richard Stallman
2009-09-23 9:24 ` Alan Mackenzie
2009-09-23 11:22 ` Eric M. Ludlam [this message]
2009-09-24 20:44 ` Alan Mackenzie
2009-09-22 16:24 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1253704976.10118.101.camel@projectile.siege-engine.com \
--to=eric@siege-engine.com \
--cc=acm@muc.de \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
--cc=zappo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).