emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 82e6c54 067/399: counsel.el: Clean up compile make invocat


From: Oleh Krehel
Subject: [elpa] master 82e6c54 067/399: counsel.el: Clean up compile make invocation
Date: Sat, 20 Jul 2019 14:56:50 -0400 (EDT)

branch: master
commit 82e6c541a0f35e076549810fd5387a5781c896cb
Author: Basil L. Contovounesios <address@hidden>
Commit: Basil L. Contovounesios <address@hidden>

    counsel.el: Clean up compile make invocation
    
    (counsel-compile-get-make-invocation): Fix typo in docstring and
    function name; change all callers.  Simplify logic.
---
 counsel.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/counsel.el b/counsel.el
index 98ced9a..3cc7140 100644
--- a/counsel.el
+++ b/counsel.el
@@ -5133,7 +5133,7 @@ to variable to `savehist-additional-variables'.")
 (defvar counsel-compile-local-builds
   '(counsel-compile-get-filtered-history
     counsel-compile-get-build-directories
-    counsel-compile-get-make-invocaton)
+    counsel-compile-get-make-invocation)
   "Additional compile invocations to feed into `counsel-compile'.
 
 This can either be a list of compile invocations strings or
@@ -5186,15 +5186,14 @@ filtering results."
                "sort"))
       "\n"))))
 
-(defun counsel-compile-get-make-invocaton (&optional blddir)
+(defun counsel-compile-get-make-invocation (&optional blddir)
   "Have a look in the root directory for any build control files.
 
 The optional BLDDIR is useful for other helpers that have found
-  sub-directories that builds may be invoked in."
-  (let* ((srcdir (funcall counsel-compile-root-function))
-         (local-files (directory-files (or blddir srcdir))))
-    (when (cl-member counsel-compile-make-pattern
-                     local-files :test #'string-match-p)
+subdirectories that builds may be invoked in."
+  (let ((srcdir (funcall counsel-compile-root-function)))
+    (when (directory-files (or blddir srcdir) nil
+                           counsel-compile-make-pattern t)
       (counsel--get-make-targets srcdir blddir))))
 
 (defun counsel--find-build-subdir (srcdir)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]