doom-files-in: match full path with :match

Instead of just the filename.
This commit is contained in:
Henrik Lissner 2018-06-26 18:08:16 +02:00
parent 8f3f31bac8
commit 79e155a2a8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -167,7 +167,7 @@ MATCH is a string regexp. Only entries that match it will be included."
(let ((fullpath (expand-file-name file path))) (let ((fullpath (expand-file-name file path)))
(cond ((file-directory-p fullpath) (cond ((file-directory-p fullpath)
(when (and (memq type '(t dirs)) (when (and (memq type '(t dirs))
(string-match-p match file) (string-match-p match fullpath)
(not (and filter (funcall filter fullpath))) (not (and filter (funcall filter fullpath)))
(not (and (file-symlink-p fullpath) (not (and (file-symlink-p fullpath)
(not follow-symlinks))) (not follow-symlinks)))
@ -185,7 +185,7 @@ MATCH is a string regexp. Only entries that match it will be included."
:relative-to ,relative-to) :relative-to ,relative-to)
rest)))))) rest))))))
((and (memq type '(t files)) ((and (memq type '(t files))
(string-match-p match file) (string-match-p match fullpath)
(not (and filter (funcall filter fullpath))) (not (and filter (funcall filter fullpath)))
(<= mindepth 0)) (<= mindepth 0))
(push (if relative-to (push (if relative-to