From 9e342a7bce93a375daa753c97e36a065351dcd7d Mon Sep 17 00:00:00 2001 From: Thomas Wallrafen Date: Fri, 18 Apr 2014 10:04:11 +0200 Subject: [PATCH] Introduce variable helm-projectile-sources-list. The variable will allow a user to reorder or even alter the list of helm sources to be used in `helm-projectile`. --- helm-projectile.el | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/helm-projectile.el b/helm-projectile.el index 8fbcd88ad..c226d481a 100644 --- a/helm-projectile.el +++ b/helm-projectile.el @@ -46,6 +46,12 @@ (require 'helm-files) (require 'cl-lib) +(defgroup helm-projectile nil + "Helm support for projectile." + :prefix "helm-projectile-" + :group 'projectile + :link `(url-link :tag "helm-projectile homepage" "https://github.com/bbatsov/projectile")) + (defvar helm-projectile-current-project-root) (defun helm-projectile-coerce-file (candidate) @@ -117,14 +123,19 @@ (action . (lambda (file) (find-file file)))) "Helm source definition.") +(defcustom helm-projectile-sources-list + '(helm-source-projectile-files-list + helm-source-projectile-buffers-list + helm-source-projectile-recentf-list) + "Default sources for `helm-projectile'." + :group 'helm-projectile) + ;;;###autoload (defun helm-projectile () "Use projectile with Helm instead of ido." (interactive) (let ((helm-ff-transformer-show-only-basename nil)) - (helm :sources '(helm-source-projectile-files-list - helm-source-projectile-buffers-list - helm-source-projectile-recentf-list) + (helm :sources helm-projectile-sources-list :buffer "*helm projectile*" :prompt (projectile-prepend-project-name "pattern: "))))