[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: |
Sat, 6 May 2017 22:05:06 +0900 |
Ok, I think I have something clean.
(btw, I'm done with the copyleft paperwork)
Here is the diff, and a potential log message.
Jean-Christophe
===========================
Add optional regexp for subr-x.el trimming functions
* lisp/emacs-lisp/subr-x.el (string-trim-left) (string-trim-right)
(string-trim): add optional regexp that defaults 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, Mark Oteiza, 2017/05/02
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/02
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Jean-Christophe Helary, 2017/05/05
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Tino Calancha, 2017/05/06
- 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, Eli Zaretskii, 2017/05/06
- 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, Eli Zaretskii, 2017/05/06
- 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,
Jean-Christophe Helary <=
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Tino Calancha, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Eli Zaretskii, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Tino Calancha, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Eli Zaretskii, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Tino Calancha, 2017/05/07
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Johan Bockgård, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Eli Zaretskii, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Johan Bockgård, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Eli Zaretskii, 2017/05/06
- Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification, Johan Bockgård, 2017/05/07