[Top][All Lists]

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

Re: [vile] mCRL filter

From: Thomas Dickey
Subject: Re: [vile] mCRL filter
Date: Sun, 13 Aug 2006 19:35:42 -0400
User-agent: Mutt/1.5.12-2006-07-14

On Fri, Aug 11, 2006 at 10:25:13AM +0200, Paul van Tilburg wrote:
> On Wed, Aug 09, 2006 at 06:45:41PM -0400, Thomas Dickey wrote:
> > On Wed, 9 Aug 2006, Paul van Tilburg wrote:
> > >By the way, this is was I added to macros/modes.rc:
> > >----
> > >define-mode mcrl
> > >~with define-submode mcrl
> > >       suf             '\.\(mcrl\|mcrl2\)$'
> > >       fence-pairs     '{}()[]'
> > >       comment-prefix  '^\s*%'
> > >       comments        '^\s*%.*$'
> > >~endwith
> > >---
> > 
> > I'm not sure (will have to read the code), but comparing with some other
> > patterns, see this works:
> > 
> >         comments        '^\s*%\s+*$'
> That's odd... will this not only match '%' preceeded and followed by
> spaces till the end of the line?  Since the comments of the mCRL file work
> the same as in LaTeX I copied the comments directive as written at the top
> of this mail.  Maybe the semantics of the comments directive is a bit
> different than how I understood it?

I can see part of the story - will see if I can improve the logic.
Reading it closer, I think that pattern "really" is treated as

            comments        '^\s*%\s+'

since there's nothing for the '*' to repeat.  Looking at the code and
history, I see the comments mode has "always" been treated the same as the
paragraph mode for formatting purposes (which seems odd).  Anyway, with

            comments        '^\s*%.*$'

the code is making an initial scan to find the end of things to format,
and finding that everything matches the 'comments' pattern, and it reaches
the end of the region without finding something that doesn't match it.
So it exits.

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

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