[Top][All Lists]

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

Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification

From: Jean-Christophe Helary
Subject: Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification
Date: Wed, 10 May 2017 12:49:35 +0900

> On May 10, 2017, at 9:45, Stefan Monnier <address@hidden> wrote:
>> Since what I propose is consistant with the existing code, not agreeing with
>> that means *first* finding the bug that Johan mentioned (which is not
>> directly related to my modification), starting a review process of the whole
>> code base that uses subr.el/split-string (and maybe other places where that
>> regexp bug happens), fixing the code to ensure some kind of backward
>> compatibility, etc. and *then* applying my change to subr-x...
> I'm pretty sure surrounding the regexp in \(?:..\) will break no code at
> all.  To me it's an absolute no-brainer that doesn't even merit any 
> discussion.

That does not seem to be the case. Johan has identified a case where a regexp 
that uses \| does not produce the same result as the "trim" argument of 
split-string whether it uses \( \) or not.

So there is the possibility that code that use the "trim" argument will produce 
an unexpected result if split-string is modified.

I am not talking about subr-x.el, it is an addition that is backward compatible 
since the new argument is optional.


reply via email to

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