Merge pull request #223 from kautsig/master

fixed helm-mini fallback if no projectile is available
This commit is contained in:
Bozhidar Batsov 2012-10-31 03:31:44 -07:00
commit 45ef0320e5

View file

@ -219,6 +219,7 @@
(defun helm-prelude () (defun helm-prelude ()
"Preconfigured `helm'." "Preconfigured `helm'."
(interactive) (interactive)
(condition-case nil
(if (projectile-project-root) (if (projectile-project-root)
;; add project files and buffers when in project ;; add project files and buffers when in project
(helm-other-buffer '(helm-c-source-projectile-files-list (helm-other-buffer '(helm-c-source-projectile-files-list
@ -228,7 +229,9 @@
helm-c-source-buffer-not-found) helm-c-source-buffer-not-found)
"*helm prelude*") "*helm prelude*")
;; otherwise fallback to helm-mini ;; otherwise fallback to helm-mini
(helm-mini))) (helm-mini))
;; fall back to helm mini if an error occurs (usually in projectile-project-root)
(error (helm-mini))))
;; shorter aliases for ack-and-a-half commands ;; shorter aliases for ack-and-a-half commands
(defalias 'ack 'ack-and-a-half) (defalias 'ack 'ack-and-a-half)