emacs-devel
[Top][All Lists]
Advanced

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

Re: regexp-opt-group


From: Stefan Monnier
Subject: Re: regexp-opt-group
Date: Mon, 20 Jan 2003 12:42:46 -0500

> "Stefan Monnier" <monnier+gnu/address@hidden> writes:
> 
> > > With this change, does everything work right?
> [...]
> 
> > The `strings' list is expected to always be properly sorted.
> > I believe that if the list is indeed sorted, then
> > (nthcdr (length half1) strings) should DTRT (and faster than your loop).
> > OTOH, if the list is not properly sorted, then it's probably a bug
> > somewhere else.
> > Note: I haven't seen the original message from Johan.
> 
> It was posted in gnu.emacs.bug.
> http://groups.google.com/groups?selm=mailman.537.1042928665.21513.bug-gnu-emacs%40gnu.org

> (regexp-opt-group '("000" "this string is missing" "foo"
>                   "0this occurs twice"))

So the bug is in the docstring of regexp-opt-group which should say
that the list should be sorted.  And also make it more clear that it's
an internal function.

Why did you use `regexp-opt-group' rather than `regexp-opt' ?


        Stefan





reply via email to

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