Skip to content
This repository
  • 3 commits
  • 2 files changed
  • 0 comments
  • 2 contributors

Showing 2 changed files with 15 additions and 10 deletions. Show diff stats Hide diff stats

  1. +1 2  contrib/eproject-anything.el
  2. +14 8 contrib/helm-eproject.el
3  contrib/eproject-anything.el
@@ -32,8 +32,7 @@
32 32 (init . (lambda () (if (buffer-file-name)
33 33 (setq anything-eproject-root-dir
34 34 (eproject-maybe-turn-on))
35   - (setq anything-eproject-root-dir 'nil)
36   - )))
  35 + (setq anything-eproject-root-dir 'nil))))
37 36 (candidates . (lambda () (if anything-eproject-root-dir
38 37 (eproject-list-project-files
39 38 anything-eproject-root-dir))))
22 contrib/helm-eproject.el
@@ -56,17 +56,22 @@
56 56 ;;; Code:
57 57
58 58 ;; helm support
59   -(require 'helm)
  59 +(require 'helm-files)
60 60 (require 'eproject)
61 61 (require 'cl)
62 62
  63 +(defun helm-eproject-build-matcher (matcher-type)
  64 + (format "\\(?:%s\\)"
  65 + (reduce (lambda (a b) (concat a "\\|" b))
  66 + (mapcar (lambda (f) (format "\\(?:%s\\)" f))
  67 + (eproject-get-project-metadatum
  68 + (eproject-type) matcher-type)))))
  69 +
63 70 (defun helm-eproject-get-files ()
64   - (let ((matcher (format "\\(?:%s\\)"
65   - (reduce (lambda (a b) (concat a "\\|" b))
66   - (mapcar (lambda (f) (format "\\(?:%s\\)" f))
67   - (eproject-get-project-metadatum
68   - (eproject-type) :relevant-files))))))
69   - (eproject--search-directory-tree (eproject-root) matcher)))
  71 + (eproject--search-directory-tree
  72 + (eproject-root)
  73 + (helm-eproject-build-matcher :relevant-files)
  74 + (helm-eproject-build-matcher :irrelevant-files)))
70 75
71 76 (defvar helm-eproject-source
72 77 '((name . " helm-eproject: ")
@@ -74,7 +79,8 @@
74 79 (setq helm-eproject-last-buffer (current-buffer))))
75 80 (type . file)
76 81 (candidates . (lambda ()
77   - (with-current-buffer helm-eproject-last-buffer (helm-eproject-get-files))))))
  82 + (with-current-buffer helm-eproject-last-buffer
  83 + (helm-eproject-get-files))))))
78 84
79 85 (defun helm-eproject ()
80 86 "helps helm to use eproject to find a file"

No commit comments for this range

Something went wrong with that request. Please try again.