bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: forward-comment doesn't (quite) match its documentation


From: Stefan Monnier
Subject: Re: forward-comment doesn't (quite) match its documentation
Date: 27 Nov 2001 11:52:37 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.50

> I'm working on getting awk-mode (derived from cc-mode) working again.

[ What do you mean by `again' ?  When did it get worse ? ]
Are you working on the version that in the CVS repository ?
If not, you should.

> The sort of thing I'm trying to do is: (i) go back to end of previous
> line;  (ii) check for a backslash line-continuation;  (iii) Go back over
> any comment.  Unfortunately, (foward-comment -1) doesn't work quite like
> I'd like it to for (iii) because it regards the /n as part of the
> comment, and so will only work when point is at the start of the next
> line.  It's not possible to specify that comments extend from '#' up to
> (but not including) \n, which I think is a pity.

But since you know how it works, you can just do (forward-char 1) before
(forward-comment -1).

> awk is a syntactic jungle:  '/' is sometimes a regexp delimiter (which
> will have string syntax), sometimes a division sign.  That means I'll
> have to do the work to check that a '#' (comment start) is not within
> '/'s (when they are regexp brackets).

The version that's in the CVS repository has font-lock tricks to 
(try to) take care of it.


        Stefan



reply via email to

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