[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master d92d43a 085/399: counsel.el (counsel-compile-root-function
From: |
Oleh Krehel |
Subject: |
[elpa] master d92d43a 085/399: counsel.el (counsel-compile-root-functions): Tidy |
Date: |
Sat, 20 Jul 2019 14:56:54 -0400 (EDT) |
branch: master
commit d92d43a2abc87fba084b3af3b40911f61258e121
Author: Basil L. Contovounesios <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-compile-root-functions): Tidy
Revert introduction of partially applied functions[1] in the
definition of a variable, as they are inefficient, illegible in
the *Help* buffer, and undocumented.
[1]: counsel.el (counsel-compile-root-functions): Change priority
2019-03-14 11:25:04 +0100
https://github.com/abo-abo/swiper/commit/86c904fd85b4a615d485058bc442c6b4f4e42786
Fixes #1968
---
counsel.el | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/counsel.el b/counsel.el
index bae9b2b..27eeb1e 100644
--- a/counsel.el
+++ b/counsel.el
@@ -5133,10 +5133,10 @@ This variable is suitable for addition to
`savehist-additional-variables'.")
(defvar counsel-compile-root-functions
- (list 'counsel--project-current
- (apply-partially #'counsel--dominating-file "configure")
- 'counsel--git-root
- (apply-partially #'counsel--dominating-file dir-locals-file))
+ '(counsel--project-current
+ counsel--configure-root
+ counsel--git-root
+ counsel--dir-locals-root)
"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
@@ -5154,11 +5154,21 @@ Use `project-current' to determine the root."
(and (fboundp 'project-current)
(cdr (project-current))))
+(defun counsel--configure-root ()
+ "Return root of current project or nil on failure.
+Use the presence of a \"configure\" file to determine the root."
+ (counsel--dominating-file "configure"))
+
(defun counsel--git-root ()
"Return root of current project or nil on failure.
Use the presence of a \".git\" file to determine the root."
(counsel--dominating-file ".git"))
+(defun counsel--dir-locals-root ()
+ "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))
+
(defvar counsel-compile-local-builds
'(counsel-compile-get-filtered-history
counsel-compile-get-build-directories
- [elpa] master 3e1e905 083/399: Fix virtual buffers in counsel-switch-buffer, (continued)
- [elpa] master 3e1e905 083/399: Fix virtual buffers in counsel-switch-buffer, Oleh Krehel, 2019/07/20
- [elpa] master cbdc9c9 078/399: counsel.el (counsel--compile-get-make-targets): Rename, Oleh Krehel, 2019/07/20
- [elpa] master e7146e5 089/399: counsel.el (counsel-git-grep-count-function): Fix, Oleh Krehel, 2019/07/20
- [elpa] master b180abf 087/399: counsel.el (counsel-compile): clean-up get-make-targets, Oleh Krehel, 2019/07/20
- [elpa] master 456e575 093/399: Don't bury killed buffers after counsel-switch-buffer, Oleh Krehel, 2019/07/20
- [elpa] master 1c84179 098/399: counsel.el (counsel-rg): Add an example to the doc, Oleh Krehel, 2019/07/20
- [elpa] master b154260 097/399: counsel.el (counsel-grep): Fix TRAMP problems, Oleh Krehel, 2019/07/20
- [elpa] master adab07d 101/399: counsel.el: Simplify counsel-git-grep, Oleh Krehel, 2019/07/20
- [elpa] master 5b4dbbc 096/399: ivy.el: Silence byte-compiler, Oleh Krehel, 2019/07/20
- [elpa] master 3954bfe 081/399: counsel.el (counsel-compile): Don't modify compilation-start-hook permanently, Oleh Krehel, 2019/07/20
- [elpa] master d92d43a 085/399: counsel.el (counsel-compile-root-functions): Tidy,
Oleh Krehel <=
- [elpa] master 2356a1d 091/399: ivy-test.el (counsel--grep-regex): Extend test, Oleh Krehel, 2019/07/20
- [elpa] master cdd7ada 094/399: counsel.el (counsel-url-expand): Avoid null error, Oleh Krehel, 2019/07/20
- [elpa] master 089107a 099/399: counsel.el (counsel-ag): Add a keyword argument caller, Oleh Krehel, 2019/07/20
- [elpa] master 776fbb7 103/399: Make ivy-switch-buffer-occur work with multi-pass regex builders, Oleh Krehel, 2019/07/20
- [elpa] master 8b4c939 100/399: counsel.el (counsel-cd): Add, Oleh Krehel, 2019/07/20
- [elpa] master 0c8cfe8 106/399: ivy-hydra.el (ivy-dispatching-done-idle): Add, Oleh Krehel, 2019/07/20
- [elpa] master 4c52362 110/399: swiper.el (swiper-occur): Make wgrep work for narrowed buffers, Oleh Krehel, 2019/07/20
- [elpa] master 8c1a2fa 107/399: Allow all re-builders to use ivy-highlight-grep-commands, Oleh Krehel, 2019/07/20
- [elpa] master 78b62f2 102/399: README.md: Mention char-fold-to-regexp, Oleh Krehel, 2019/07/20
- [elpa] master a601e40 104/399: counsel.el (counsel-org-goto-all): Use org-mode outline settings, Oleh Krehel, 2019/07/20