summaryrefslogtreecommitdiff
path: root/cider-util.el
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.com>2015-08-23 16:42:39 +0300
committerBozhidar Batsov <bozhidar@batsov.com>2015-08-23 16:42:39 +0300
commit2495a4c57cb03c9bcedd3cecdd9a53eba359e7bc (patch)
treeca394d18601754178df1a9d7c37f9c6e8480db3b /cider-util.el
parentaa97ddb70937453d0ce92f77604de7606cf69d39 (diff)
[#1225] Move a bunch of connection management logic to CIDER itself
An nREPL client library shouldn't really handle connection multiplexing and similar concerns. It should simply dispatch requests over a specified connection - plain & simple. It's the responsibility of the users to decide what kind of connection management they'd like to implement.
Diffstat (limited to 'cider-util.el')
-rw-r--r--cider-util.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/cider-util.el b/cider-util.el
index 73363c7f..b637e29e 100644
--- a/cider-util.el
+++ b/cider-util.el
@@ -182,6 +182,12 @@ to."
(browse-url (concat "https://github.com/clojure-emacs/cider#"
section-id)))))
+(defun cider--project-name (dir)
+ "Extracts a project name from DIR, possibly nil.
+The project name is the final component of DIR if not nil."
+ (when dir
+ (file-name-nondirectory (directory-file-name dir))))
+
(provide 'cider-util)
;;; cider-util.el ends here