SPC feh on spacemacs should load custom path

The README.md file for spacemacs is not in the spacemacs directory, but
in the project root.  This adds a special case for it.
This commit is contained in:
Herbert Jones 2015-02-27 10:23:50 -06:00 committed by syl20bnr
parent fac442c471
commit 14970bc785

View file

@ -100,10 +100,13 @@
(defun helm-spacemacs//layer-action-open-file (file candidate)
"Open FILE of the passed CANDIDATE."
(let ((path (file-name-as-directory
(concat (ht-get configuration-layer-paths
(intern candidate))
candidate))))
(let ((path (if (and (equalp file "README.md") (equalp candidate "spacemacs"))
;; Readme for spacemacs is in the project root
(ht-get configuration-layer-paths (intern candidate))
(file-name-as-directory
(concat (ht-get configuration-layer-paths
(intern candidate))
candidate)))))
(find-file (concat path file))))
(defun helm-spacemacs//layer-action-open-readme (candidate)