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: Mark Oteiza
Subject: Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification
Date: Tue, 02 May 2017 19:11:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Jean-Christophe Helary <address@hidden> writes:

> Following the discussion about how trimming in subr-x.el did not allow
> for non-default regex, I have this small modification to the 3
> trimming functions found therein.
>
> Basically:
> 1) I extracted the default regex and assigned it to string-trim-default-regex
> 2) I declared optional "trim-left" and "trim-right" arguments
> respectively for the string-trim-left and string-trim-right functions,
> and declared both optional for the general string-trim function
>
> The documentation strings are pretty much taken from subr.el so maybe
> the wording is not the best.
>
> Please advise.

Basically everything in subr-x is either a macro or a defsubst, except
for read-multiple-choice (aside: why is this not in its own library?).

As such, most uses of subr-x are done with (eval-when-compile (require
'subr-x)).  Won't the use of a global variable break these?



reply via email to

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