emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [nongnu] elpa/helm 07dacfe2e2 08/11: Prefer string-match-p over stri


From: Eli Zaretskii
Subject: Re: [nongnu] elpa/helm 07dacfe2e2 08/11: Prefer string-match-p over string-suffix-p
Date: Thu, 14 Sep 2023 15:59:27 +0300

> From: Philip Kaludercic <philipk@posteo.net>
> Cc: Thierry Volpiatto <thievol@posteo.net>
> Date: Thu, 14 Sep 2023 12:25:55 +0000
> 
> ELPA Syncer <elpasync@gnu.org> writes:
> 
> > --- a/helm-lib.el
> > +++ b/helm-lib.el
> > @@ -1732,7 +1732,7 @@ Directories expansion is not supported."
> >                    (with-temp-buffer
> >                      (call-process-shell-command 
> >                       (format cmd
> > -                             (if (string-suffix-p ".gz" file)
> > +                             (if (string-match-p ".gz\\'" file)
> 
> Is there a reason for this preference?

I think this change is simply incorrect: the first argument of
string-suffix-p is not interpreted as a regexp, but as a simple
literal string (the implementation uses compare-strings internally).

> Also, I assume you want to quote the period in ".gz\\'"?

No need to quote it, see above.



reply via email to

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