File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1610,6 +1610,12 @@ It does not yet set the input history."
1610
1610
(read (current-buffer ))))
1611
1611
'()))
1612
1612
1613
+ (defun cider-repl--find-dir-for-history ()
1614
+ " Find the first suitable directory to store the project's history."
1615
+ (seq-find
1616
+ (lambda (dir ) (and (not (null dir)) (not (tramp-tramp-file-p dir))))
1617
+ (list nrepl-project-dir (clojure-project-dir) default-directory)))
1618
+
1613
1619
(defun cider-repl-history-load (&optional filename )
1614
1620
" Load history from FILENAME into current session.
1615
1621
FILENAME defaults to the value of `cider-repl-history-file' but user
@@ -1621,7 +1627,7 @@ The value of `cider-repl-input-history' is set by this function."
1621
1627
(filename (setq cider-repl-history-file filename))
1622
1628
((equal 'per-project cider-repl-history-file)
1623
1629
(make-local-variable 'cider-repl-input-history )
1624
- (when-let ((dir (clojure-project- dir)))
1630
+ (when-let ((dir (cider-repl--find- dir-for-history )))
1625
1631
(setq-local
1626
1632
cider-repl-history-file (expand-file-name " .cider-history" dir)))))
1627
1633
(when cider-repl-history-file
You can’t perform that action at this time.
0 commit comments