all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: "Eric M. Ludlam" <eric@siege-engine.com>
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: Thu, 24 Sep 2009 20:44:59 +0000	[thread overview]
Message-ID: <20090924204458.GA12292@muc.de> (raw)
In-Reply-To: <1253704976.10118.101.camel@projectile.siege-engine.com>

Hi, Eric!

On Wed, Sep 23, 2009 at 07:22:56AM -0400, Eric M. Ludlam wrote:
> On Wed, 2009-09-23 at 09:24 +0000, Alan Mackenzie wrote:
> > Hi, Richard and Eric!

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

Thanks, I had a look at that.

> It would not greatly affect my code if some new function moved the
> point, or just returned where the end is.

OK.  I just committed a change to .../lisp/progmodes/cc-cmds.el with the
new function c-scan-conditionals which doesn't set the mark, and doesn't
move point, instead returning the final position, much like scan-lists.

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

Possibly the WITH-ELSE parameter to c-scan-conditionals might be useful.

> Eric

-- 
Alan Mackenzie (Nuremberg, Germany).




  reply	other threads:[~2009-09-24 20:44 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
2009-09-24 20:44         ` Alan Mackenzie [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090924204458.GA12292@muc.de \
    --to=acm@muc.de \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=eric@siege-engine.com \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.