[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.
===========================
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.
>
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, (continued)
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Andreas Schwab, 2017/05/09
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Eli Zaretskii, 2017/05/09
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Andreas Schwab, 2017/05/10
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/10
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/07
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Eli Zaretskii, 2017/05/07
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Stefan Monnier, 2017/05/07
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification,
Jean-Christophe Helary <=
- Message not available
- Re: bug#26908: Fwd: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/16
- Re: bug#26908: Fwd: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Eli Zaretskii, 2017/05/16
- Re: bug#26908: Fwd: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/16
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/06
- RE: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Drew Adams, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Stefan Monnier, 2017/05/06
- subr-x.el code and defsubst [was: Trimming strings, /.../subr-x.el modification], Drew Adams, 2017/05/06
- Re: subr-x.el code and defsubst [was: Trimming strings, /.../subr-x.el modification], Tianxiang Xiong, 2017/05/14
- RE: subr-x.el code and defsubst [was: Trimming strings, /.../subr-x.el modification], Drew Adams, 2017/05/14
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Andreas Schwab, 2017/05/06