[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: Johan Bockgård
Subject: Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification
Date: Tue, 09 May 2017 00:45:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Jean-Christophe Helary <address@hidden> writes:

>> No, the issue is whether the function should enclose the argument in a
>> grouping constructs of any kind, or should this be the caller's
>> responsibility when the regexp includes \|.
> (split-string) in subr.el (line 3808) doesn't use grouping constructs
> so why do something different than what's already the norm in an
> official emacs lisp file? Doesn't that settle the issue?

To me, that's nothing other than a bug:

    (split-string "abc, ;def g,hi" nil nil "[,;]")
      ("abc" "def" "g,hi")

    ;; Should be equivalent!
    (split-string "abc, ;def g,hi" nil nil ",\\|;")
      ("abc" "def" "g")  ; BUG

reply via email to

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