emacs-devel
[Top][All Lists]
Advanced

[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 23:26:04 +0900

Hopefully last fixes.

I've added the \\(?: ... \\) parens to make sure we capture any potential issue 
with \|.

Is there anything else I've missed ?

Jean-Christophe 


===========================
Add optional regexps for subr-x.el trimming functions

* lisp/emacs-lisp/subr-x.el (string-trim-left, string-trim-right, string-trim): 
add optional regexps that default on the original behavior.
===========================


Attachment: subr-x.el.diff
Description: Binary data




> On May 6, 2017, at 20:02, Jean-Christophe Helary <address@hidden> wrote:
> 
> Ok, I'm fine with that. Apologies for my lack of understanding of the issues.
> 
> Jean-Christophe
> 
>> On May 6, 2017, at 19:43, Eli Zaretskii <address@hidden> wrote:
>> 
>>> From: Jean-Christophe Helary <address@hidden>
>>> Date: Sat, 6 May 2017 19:33:10 +0900
>>> Cc: address@hidden,
>>> address@hidden,
>>> address@hidden
>>> 
>>> My original idea was to put the regexp into a variable that *can* 
>>> eventually be overridden by a user preference.
>> 
>> Does this really have legitimate use cases?  We are talking about a
>> very low-level function; overriding its default definition of
>> whitespace by a user option would affect every single use of this
>> function, and will most probably disrupt some code which uses it.
>> 
>> I think having a way for overriding the default programmatically
>> should be good enough, at least for now.  Let's not provide a
>> defcustom unless and until we have use cases for that which we want to
>> support.
> 


reply via email to

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