Commit b6af0900 authored by Dmitry Gutov's avatar Dmitry Gutov
Browse files

Misc ignore-related project.el changes

* lisp/progmodes/project.el (project-ignores): Don't append the
default ignores list, just use vc-directory-exclusion-list.
(project--dir-ignores): Use the default ignores if the dir is
outside of the current project.
(project-files): Use project--dir-ignores to support external
roots better.
parent 7717778e
Pipeline #569 passed with stage
in 50 minutes and 1 second
......@@ -184,7 +184,8 @@ to find the list of ignores for each directory."
(require 'xref)
(lambda (dir)
(project--files-in-directory dir (project-ignores project dir)))
(project--files-in-directory dir
(project--dir-ignores project dir)))
(or dirs (project-roots project))))
(defun project--files-in-directory (dir ignores &optional files)
......@@ -283,7 +284,10 @@ backend implementation of `project-external-roots'.")
(vc-call-backend backend 'ignore-completion-table root)))
(project--value-in-dir 'project-vc-ignores root)
(lambda (dir)
(concat dir "/"))
(defun project-combine-directories (&rest lists-of-dirs)
"Return a sorted and culled list of directory names.
......@@ -346,7 +350,8 @@ requires quoting, e.g. `\\[quoted-insert]<space>'."
(defun project--dir-ignores (project dir)
(let* ((roots (project-roots project))
(root (cl-find dir roots :test #'file-in-directory-p)))
(when root
(if (not root)
(project-ignores nil nil) ;The defaults.
(let ((ignores (project-ignores project root)))
(if (file-equal-p root dir)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment