File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 22
33## master (unreleased)
44
5+ ### Bugs fixed
6+
7+ * Fix the project.el integration.
8+
59## 5.8.0 (2018-06-26)
610
711### New features
Original file line number Diff line number Diff line change @@ -555,7 +555,7 @@ replacement for `cljr-expand-let`."
555555 (add-hook 'electric-indent-functions
556556 (lambda (_char ) (if (clojure-in-docstring-p) 'do-indent )))
557557 ; ; integration with project.el
558- (add-hook 'project-find-functions #'clojure-project-dir ))
558+ (add-hook 'project-find-functions #'clojure-current-project ))
559559
560560(defcustom clojure-verify-major-mode t
561561 " If non-nil, warn when activating the wrong `major-mode' ."
@@ -1665,6 +1665,16 @@ are cached in a buffer local variable (`clojure-cached-project-dir')."
16651665 (setq clojure-cached-project-dir project-dir))
16661666 project-dir))
16671667
1668+ (defun clojure-current-project (&optional dir-name )
1669+ " Return the current project as a cons cell usable by project.el.
1670+
1671+ Call is delegated down to `clojure-clojure-dir' with
1672+ optional DIR-NAME as argument."
1673+ (let ((project-dir (clojure-project-dir dir-name)))
1674+ (if project-dir
1675+ (cons 'clojure project-dir)
1676+ nil )))
1677+
16681678(defun clojure-project-root-path (&optional dir-name )
16691679 " Return the absolute path to the project's root directory.
16701680
You can’t perform that action at this time.
0 commit comments