* Re: /srv/bzr/emacs/trunk r107646: * lisp/files.el (move-file-to-trash): Files aren't regexps.
[not found] <E1SAQ61-0002vF-Rw@vcs.savannah.gnu.org>
@ 2012-03-21 19:10 ` Glenn Morris
2012-03-21 21:14 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Glenn Morris @ 2012-03-21 19:10 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
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...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-21 21:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1SAQ61-0002vF-Rw@vcs.savannah.gnu.org>
2012-03-21 19:10 ` /srv/bzr/emacs/trunk r107646: * lisp/files.el (move-file-to-trash): Files aren't regexps Glenn Morris
2012-03-21 21:14 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.