emacs-devel
[Top][All Lists]
Advanced

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

Re: /srv/bzr/emacs/trunk r107646: * lisp/files.el (move-file-to-trash):


From: Stefan Monnier
Subject: Re: /srv/bzr/emacs/trunk r107646: * lisp/files.el (move-file-to-trash): Files aren't regexps.
Date: Wed, 21 Mar 2012 17:14:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

>> ;; We can't trash a parent directory of trash-directory.
>> -       (if (string-match fn trash-dir)
>> +       (if (string-prefix-p fn trash-dir)
>> (error "Trash directory `%s' is a subdirectory of `%s'"
>> trash-dir filename))
> Would the recently added file-subdir-of-p be more appropriate?

Oh, yes, even better.

> It also exists as vc-string-prefix-p, latex-string-prefix-p,
> tex-string-prefix-p, cvs-string-prefix-p, mpc-string-prefix-p...

These should be replaced, I guess,


        Stefan



reply via email to

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