<<< Date Index >>>     <<< Thread Index >>>

Re: [un]alternates not quite working



On 2004-05-18 14:45:40 -0400, David Yitzchak Cohen wrote:

> which in turn would require either (a) two new statements
> (nonalternates and unnonalternates in this case, maybe?) for
> every statement pair that currently uses regex lists, or (b) a
> "clever" overloading of the current alternates and unalternates
> commands to make them do "the right thing" by trying to guess
> which operation you wanted to invoke.

That sounds solvable to me -- IF the regular expression passed to
unalternates is literally identical (strcmp == 0) to a regular
expression already "alternated", then delete that expression.
Otherwise, add the expression to the "un"-list.

(I think we are doing something similar with header weeding already,
so this would just be consistent.)

-- 
Thomas Roessler · Personal soap box at <http://log.does-not-exist.org/>.