Browse Source

Merge pull request #223 from kautsig/master

fixed helm-mini fallback if no projectile is available
custom
Bozhidar Batsov 13 years ago
parent
commit
45ef0320e5
  1. 23
      prelude/prelude-editor.el

23
prelude/prelude-editor.el

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

Loading…
Cancel
Save