[Top][All Lists]
[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: |
Glenn Morris |
Subject: |
Re: /srv/bzr/emacs/trunk r107646: * lisp/files.el (move-file-to-trash): Files aren't regexps. |
Date: |
Wed, 21 Mar 2012 15:10:16 -0400 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Stefan Monnier wrote:
> ;; 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?
Also, I'd never heard of string-prefix-p (added in 23.2). It was never
mentioned in NEWS or documented in the manual.
It also exists as vc-string-prefix-p, latex-string-prefix-p,
tex-string-prefix-p, cvs-string-prefix-p, mpc-string-prefix-p...
- Re: /srv/bzr/emacs/trunk r107646: * lisp/files.el (move-file-to-trash): Files aren't regexps.,
Glenn Morris <=