aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorTino Calancha2017-08-05 14:04:56 +0900
committerTino Calancha2017-08-05 14:20:28 +0900
commit055e2a1906a2f02c7b77537cbb4df858b00b39d9 (patch)
treec8cfbf37db8d31d2d2619ceaf0f2425ec889909a /lisp
parent12d7757a794edaf6ad81ee468dc99998ecf5d4ac (diff)
downloademacs-055e2a1906a2f02c7b77537cbb4df858b00b39d9.tar.gz
emacs-055e2a1906a2f02c7b77537cbb4df858b00b39d9.zip
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/files.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 89f6f9f44dc..c9114be55a9 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6566,7 +6566,7 @@ Valid wildcards are '*', '?', '[abc]' and '[a-z]'."
6566 ls-lisp-support-shell-wildcards) 6566 ls-lisp-support-shell-wildcards)
6567 (string-match (concat "[" wildcards "]") (file-name-directory dir)) 6567 (string-match (concat "[" wildcards "]") (file-name-directory dir))
6568 (not (file-exists-p dir))) ; Prefer an existing file to wildcards. 6568 (not (file-exists-p dir))) ; Prefer an existing file to wildcards.
6569 (let ((regexp (format "\\`\\([^%s]+/\\)\\([^%s]*[%s].*\\)" 6569 (let ((regexp (format "\\`\\([^%s]*/\\)\\([^%s]*[%s].*\\)"
6570 wildcards wildcards wildcards))) 6570 wildcards wildcards wildcards)))
6571 (string-match regexp dir) 6571 (string-match regexp dir)
6572 (cons (match-string 1 dir) (match-string 2 dir)))))) 6572 (cons (match-string 1 dir) (match-string 2 dir))))))