[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master db905cc 088/399: counsel.el (counsel-compile-phony-pattern
From: |
Oleh Krehel |
Subject: |
[elpa] master db905cc 088/399: counsel.el (counsel-compile-phony-pattern): Use plain regex |
Date: |
Sat, 20 Jul 2019 14:56:54 -0400 (EDT) |
branch: master
commit db905cc9916c2a90c08deabf4c81e49d58059508
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-compile-phony-pattern): Use plain regex
* counsel.el (counsel-compile--probe-make-targets): Simplify a little.
Re #1972
---
counsel.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/counsel.el b/counsel.el
index bbe6884..8db26d3 100644
--- a/counsel.el
+++ b/counsel.el
@@ -5196,8 +5196,7 @@ N in your system."
"List of potential build subdirectory names to check for."
:type '(repeat directory))
-(defvar counsel-compile-phony-pattern
- (rx bol ".PHONY:" space (group (+ print)) eol)
+(defvar counsel-compile-phony-pattern "^\\.PHONY:[\t ]+\\(.*+\\)$"
"Regexp for extracting phony targets from Makefiles.")
;; This is loosely based on the Bash Make completion code
@@ -5209,16 +5208,17 @@ happen because some sort of configuration needs to be
done first
or the source tree is pristine and being used for multiple build
trees."
(let ((default-directory dir)
- (targets))
+ (targets nil))
(with-temp-buffer
;; 0 = no-rebuild, -q & 1 needs rebuild, 2 error (for GNUMake at
;; least)
- (when (> 2 (call-process "make" nil t nil "-nqp"))
+ (when (< (call-process "make" nil t nil "-nqp") 2)
(goto-char (point-min))
(while (re-search-forward counsel-compile-phony-pattern nil t)
- (push (split-string (match-string-no-properties 1))
- targets))))
- (sort (apply #'nconc targets) 'string-lessp)))
+ (setq targets
+ (nconc targets (split-string
+ (match-string-no-properties 1)))))))
+ (sort targets #'string-lessp)))
(defun counsel--compile-get-make-targets (srcdir &optional blddir)
"Return a list of Make targets for a given SRCDIR/BLDDIR combination.
- [elpa] master f0d93cf 073/399: counsel.el (counsel-compile): counsel-compile-get-filtered-history, (continued)
- [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, 2019/07/20
- [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 <=
- [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
- [elpa] master 114ae96 070/399: counsel.el: Find project root more flexibly, Oleh Krehel, 2019/07/20
- [elpa] master 5aa263c 079/399: counsel.el (counsel-compile-make-pattern): Fix regex, Oleh Krehel, 2019/07/20
- [elpa] master cc50da2 080/399: counsel.el (counsel-dired-jump-args): Fix -type d, Oleh Krehel, 2019/07/20
- [elpa] master a473519 086/399: Fix error in ivy-make-magic-action, Oleh Krehel, 2019/07/20
- [elpa] master 9ce9e4e 090/399: counsel.el (counsel-compile-phony-pattern): Fixup, Oleh Krehel, 2019/07/20
- [elpa] master 1046fc7 095/399: ivy.el (ivy-avy): Use non-obsolete avy-process, Oleh Krehel, 2019/07/20
- [elpa] master 27add46 092/399: Anchor pcre lookaround patterns to bol, Oleh Krehel, 2019/07/20