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 2
2
3
3
## master (unreleased)
4
4
5
+ ### Bugs fixed
6
+
7
+ * Fix the project.el integration.
8
+
5
9
## 5.8.0 (2018-06-26)
6
10
7
11
### New features
Original file line number Diff line number Diff line change @@ -555,7 +555,7 @@ replacement for `cljr-expand-let`."
555
555
(add-hook 'electric-indent-functions
556
556
(lambda (_char ) (if (clojure-in-docstring-p) 'do-indent )))
557
557
; ; integration with project.el
558
- (add-hook 'project-find-functions #'clojure-project-dir ))
558
+ (add-hook 'project-find-functions #'clojure-current-project ))
559
559
560
560
(defcustom clojure-verify-major-mode t
561
561
" 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')."
1665
1665
(setq clojure-cached-project-dir project-dir))
1666
1666
project-dir))
1667
1667
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
+
1668
1678
(defun clojure-project-root-path (&optional dir-name )
1669
1679
" Return the absolute path to the project's root directory.
1670
1680
You can’t perform that action at this time.
0 commit comments