fixed helm-mini fallback

This commit is contained in:
Chris Raschl 2012-10-31 08:24:46 +01:00
parent d2f7535348
commit 5f11f8ddeb

View file

@ -219,16 +219,19 @@
(defun helm-prelude () (defun helm-prelude ()
"Preconfigured `helm'." "Preconfigured `helm'."
(interactive) (interactive)
(if (projectile-project-root) (condition-case nil
;; add project files and buffers when in project (if (projectile-project-root)
(helm-other-buffer '(helm-c-source-projectile-files-list ;; add project files and buffers when in project
helm-c-source-projectile-buffers-list (helm-other-buffer '(helm-c-source-projectile-files-list
helm-c-source-buffers-list helm-c-source-projectile-buffers-list
helm-c-source-recentf helm-c-source-buffers-list
helm-c-source-buffer-not-found) helm-c-source-recentf
"*helm prelude*") helm-c-source-buffer-not-found)
;; otherwise fallback to helm-mini "*helm prelude*")
(helm-mini))) ;; otherwise fallback to 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)