[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 86c904f 077/399: counsel.el (counsel-compile-root-function
From: |
Oleh Krehel |
Subject: |
[elpa] master 86c904f 077/399: counsel.el (counsel-compile-root-functions): Change priority |
Date: |
Sat, 20 Jul 2019 14:56:52 -0400 (EDT) |
branch: master
commit 86c904fd85b4a615d485058bc442c6b4f4e42786
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-compile-root-functions): Change priority
* counsel.el (counsel--project-current): Rename.
(counsel--root-dir-locals): Remove. Avoid functions that are just
`apply-partially' if they are used only in one place.
Re #1966
---
counsel.el | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/counsel.el b/counsel.el
index 039ff92..d6d388f 100644
--- a/counsel.el
+++ b/counsel.el
@@ -5120,9 +5120,10 @@ This variable is suitable for addition to
`savehist-additional-variables'.")
(defvar counsel-compile-root-functions
- '(counsel--root-project
- counsel--root-dir-locals
- counsel--git-root)
+ (list #'counsel--project-current
+ (apply-partially #'counsel--dominating-file "configure")
+ #'counsel--git-root
+ (apply-partially #'counsel--dominating-file dir-locals-file))
"Special hook to find the project root for compile commands.
Each function on this hook is called in turn with no arguments
and should return either a directory, or nil if no root was
@@ -5134,17 +5135,12 @@ The root is determined by
`counsel-compile-root-functions'."
(or (run-hook-with-args-until-success 'counsel-compile-root-functions)
(error "Couldn't find project root")))
-(defun counsel--root-project ()
+(defun counsel--project-current ()
"Return root of current project or nil on failure.
Use `project-current' to determine the root."
(and (fboundp 'project-current)
(cdr (project-current))))
-(defun counsel--root-dir-locals ()
- "Return root of current project or nil on failure.
-Use the presence of a `dir-locals-file' to determine the root."
- (counsel--dominating-file dir-locals-file))
-
(defun counsel--git-root ()
"Return root of current project or nil on failure.
Use the presence of a \".git\" file to determine the root."
- [elpa] master 5f5a263 054/399: counsel.el (counsel-compile): Add, (continued)
- [elpa] master 5f5a263 054/399: counsel.el (counsel-compile): Add, Oleh Krehel, 2019/07/20
- [elpa] master adea72f 060/399: counsel.el: Simplify counsel-compile action, Oleh Krehel, 2019/07/20
- [elpa] master 50dc9e6 065/399: counsel.el (counsel--get-build-subdirs): Fix, Oleh Krehel, 2019/07/20
- [elpa] master 4e0d403 066/399: counsel.el (counsel--find-build-subdir): Simplify, Oleh Krehel, 2019/07/20
- [elpa] master 144e7d9 069/399: counsel.el: Clean up recent compile variables, Oleh Krehel, 2019/07/20
- [elpa] master 82e6c54 067/399: counsel.el: Clean up compile make invocation, Oleh Krehel, 2019/07/20
- [elpa] master bb58a29 071/399: counsel.el (counsel-ag): Fix error in non-Git directory, Oleh Krehel, 2019/07/20
- [elpa] master f0d93cf 073/399: counsel.el (counsel-compile): counsel-compile-get-filtered-history, Oleh Krehel, 2019/07/20
- [elpa] master ce0c39e 076/399: counsel.el (counsel--git-root): Rename, Oleh Krehel, 2019/07/20
- [elpa] master a37d4e3 072/399: counsel.el (counsel-compile): fix breakage to subdir recursion, Oleh Krehel, 2019/07/20
- [elpa] master 86c904f 077/399: counsel.el (counsel-compile-root-functions): Change priority,
Oleh Krehel <=
- [elpa] master c2788de 082/399: counsel.el (counsel--switch-buffer-update-fn): if to cond, Oleh Krehel, 2019/07/20
- [elpa] master 1439e8d 064/399: counsel.el: Simplify compile build dir collection, Oleh Krehel, 2019/07/20
- [elpa] master 7e8a362 068/399: counsel.el (counsel--get-make-targets): Clean up, Oleh Krehel, 2019/07/20
- [elpa] master d64b268 074/399: counsel.el (counsel-compile): counsel--get-build-subdirs, Oleh Krehel, 2019/07/20
- [elpa] master 6f0f32f 084/399: counsel.el (counsel-git-grep-count-function): Promote to defcustom, Oleh Krehel, 2019/07/20
- [elpa] master 25336fd 075/399: counsel.el (counsel-compile): counsel-compile-local-builds, Oleh Krehel, 2019/07/20
- [elpa] master db905cc 088/399: counsel.el (counsel-compile-phony-pattern): Use plain regex, Oleh Krehel, 2019/07/20
- [elpa] master 4e07e6f 048/399: ivy.el (ivy-make-magic-action): Add docstring to the generated lambda, Oleh Krehel, 2019/07/20
- [elpa] master 8a40934 062/399: counsel.el: Clean up compile candidates list, Oleh Krehel, 2019/07/20
- [elpa] master 0c30e3f 063/399: counsel.el: Minor compile history cleanup, Oleh Krehel, 2019/07/20