diff options
| author | Dmitry Gutov | 2022-12-09 23:21:10 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2022-12-09 23:21:28 +0200 |
| commit | 33a8415eb7e2f5baebffc529a422fb17dc3fd09e (patch) | |
| tree | ae06ae623947185d8ec2a001dcd18a316dccc5e0 | |
| parent | 594267395d5b082d14d3009278213f1dbe91cd46 (diff) | |
| download | emacs-33a8415eb7e2f5baebffc529a422fb17dc3fd09e.tar.gz emacs-33a8415eb7e2f5baebffc529a422fb17dc3fd09e.zip | |
Use 'project--value-in-dir' for 'project-vc-include-untracked' too
* lisp/progmodes/project.el (project--vc-list-files): Use
'project--value-in-dir' for 'project-vc-include-untracked' too.
So that is can be reliably set through dir-locals.
| -rw-r--r-- | lisp/progmodes/project.el | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 342ee239c7e..016dfdd5b4d 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -609,13 +609,16 @@ project backend implementation of `project-external-roots'.") | |||
| 609 | (defvar vc-git-use-literal-pathspecs) | 609 | (defvar vc-git-use-literal-pathspecs) |
| 610 | (pcase backend | 610 | (pcase backend |
| 611 | (`Git | 611 | (`Git |
| 612 | (let ((default-directory (expand-file-name (file-name-as-directory dir))) | 612 | (let* ((default-directory (expand-file-name (file-name-as-directory dir))) |
| 613 | (args '("-z")) | 613 | (args '("-z")) |
| 614 | (vc-git-use-literal-pathspecs nil) | 614 | (vc-git-use-literal-pathspecs nil) |
| 615 | files) | 615 | (include-untracked (project--value-in-dir |
| 616 | 'project-vc-include-untracked | ||
| 617 | dir)) | ||
| 618 | files) | ||
| 616 | (setq args (append args | 619 | (setq args (append args |
| 617 | '("-c" "--exclude-standard") | 620 | '("-c" "--exclude-standard") |
| 618 | (and project-vc-include-untracked '("-o")))) | 621 | (and include-untracked '("-o")))) |
| 619 | (when extra-ignores | 622 | (when extra-ignores |
| 620 | (setq args (append args | 623 | (setq args (append args |
| 621 | (cons "--" | 624 | (cons "--" |
| @@ -666,10 +669,13 @@ project backend implementation of `project-external-roots'.") | |||
| 666 | ;; XXX: Better solutions welcome, but this seems cheap enough. | 669 | ;; XXX: Better solutions welcome, but this seems cheap enough. |
| 667 | (delete-consecutive-dups files))) | 670 | (delete-consecutive-dups files))) |
| 668 | (`Hg | 671 | (`Hg |
| 669 | (let ((default-directory (expand-file-name (file-name-as-directory dir))) | 672 | (let* ((default-directory (expand-file-name (file-name-as-directory dir))) |
| 670 | (args (list (concat "-mcard" (and project-vc-include-untracked "u")) | 673 | (include-untracked (project--value-in-dir |
| 671 | "--no-status" | 674 | 'project-vc-include-untracked |
| 672 | "-0"))) | 675 | dir)) |
| 676 | (args (list (concat "-mcard" (and include-untracked "u")) | ||
| 677 | "--no-status" | ||
| 678 | "-0"))) | ||
| 673 | (when extra-ignores | 679 | (when extra-ignores |
| 674 | (setq args (nconc args | 680 | (setq args (nconc args |
| 675 | (mapcan | 681 | (mapcan |