mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 02:31:03 -08:00
insert-directory-wildcard-in-dir-p: Tweak regexp
This function must return non-nil for a wildcard like '/*/*.txt'. * lisp/files.el (insert-directory-wildcard-in-dir-p): Adjust regexp. * test/lisp/files-tests.el (files-tests--insert-directory-wildcard-in-dir-p): Add test.
This commit is contained in:
parent
12d7757a79
commit
055e2a1906
2 changed files with 19 additions and 1 deletions
|
|
@ -6566,7 +6566,7 @@ Valid wildcards are '*', '?', '[abc]' and '[a-z]'."
|
|||
ls-lisp-support-shell-wildcards)
|
||||
(string-match (concat "[" wildcards "]") (file-name-directory dir))
|
||||
(not (file-exists-p dir))) ; Prefer an existing file to wildcards.
|
||||
(let ((regexp (format "\\`\\([^%s]+/\\)\\([^%s]*[%s].*\\)"
|
||||
(let ((regexp (format "\\`\\([^%s]*/\\)\\([^%s]*[%s].*\\)"
|
||||
wildcards wildcards wildcards)))
|
||||
(string-match regexp dir)
|
||||
(cons (match-string 1 dir) (match-string 2 dir))))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue