emacs-devel
[Top][All Lists]
Advanced

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

Re: Forbid reverse ranges in rx


From: Stefan Monnier
Subject: Re: Forbid reverse ranges in rx
Date: Tue, 12 Mar 2019 12:56:40 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> > +                      (error "Reverse range `%c-%c' in Rx `any'
>> > not permitted"
>> > +                             start end)))
>> 
>> Consider rephrasing this to explain why it's not permitted (maybe "…
>> no permitted, as it does not match anything").
>
> Do we really need to mention the legacy semantics, which were
> accidental and arbitrary? "Z-A" is disallowed because it doesn't make
> sense, not because of what happened before we thought of checking.

Indeed, I don't think we need to explain in detail, but I think it's
likely that the naive user will simply not understand "reverse
range".

Maybe instead of saying it's not permitted, we should say "range %c-%c
is reversed"?


        Stefan




reply via email to

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