[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 0c30e3f 063/399: counsel.el: Minor compile history cleanup
From: |
Oleh Krehel |
Subject: |
[elpa] master 0c30e3f 063/399: counsel.el: Minor compile history cleanup |
Date: |
Sat, 20 Jul 2019 14:56:49 -0400 (EDT) |
branch: master
commit 0c30e3fced7d5037da7523a82132769320c466a9
Author: Basil L. Contovounesios <address@hidden>
Commit: Basil L. Contovounesios <address@hidden>
counsel.el: Minor compile history cleanup
(counsel-compile-get-filtered-history):
Simplify loop. Do not mangle match data. Fix variable names.
---
counsel.el | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/counsel.el b/counsel.el
index 11f4b64..1f05795 100644
--- a/counsel.el
+++ b/counsel.el
@@ -5236,16 +5236,15 @@ The optional BLDDIR is useful for other helpers that
have found
(defun counsel-compile-get-filtered-history (&optional dir)
"Return a compile history relevant to current project."
(let ((root (or dir (funcall counsel-compile-root-function)))
- (kept-history))
- (mapc
- (lambda (hist)
- (let ((srcdir (get-text-property 0 'srcdir hist))
- (blddir (get-text-property 0 'blddir hist)))
- (when (or (and srcdir (string-match srcdir root))
- (and blddir (string-match blddir root)))
- (push hist kept-history))))
- counsel-compile-history)
- kept-history))
+ history)
+ (dolist (item counsel-compile-history)
+ (let ((srcdir (get-text-property 0 'srcdir item))
+ (blddir (get-text-property 0 'blddir item)))
+ ;; FIXME: File names are not regexps!
+ (when (or (and srcdir (string-match-p srcdir root))
+ (and blddir (string-match-p blddir root)))
+ (push item history))))
+ history))
(defun counsel--get-compile-candidates (&optional dir)
"Return the list of compile commands.
- [elpa] master 86c904f 077/399: counsel.el (counsel-compile-root-functions): Change priority, (continued)
- [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, 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 <=
- [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
- [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