File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -3305,11 +3305,21 @@ warning by customizing `cljr-suppress-no-project-warning'.)"))))
3305
3305
(defvar cljr--list-fold-function-names-with-index
3306
3306
'(" map-indexed" " keep-indexed" ))
3307
3307
3308
+ (defun cljr--chop-prefix (prefix s )
3309
+ " Remove PREFIX if it is at the start of S."
3310
+ (declare (pure t ) (side-effect-free t ))
3311
+ (let ((pos (length prefix)))
3312
+ (if (and (>= (length s) (length prefix))
3313
+ (string= prefix (substring s 0 pos)))
3314
+ (substring s pos)
3315
+ s)))
3316
+
3308
3317
(defun cljr--ns-path (ns-name )
3309
3318
" Find the file path to the ns named NS-NAME."
3310
3319
(cider-ensure-connected)
3311
3320
(cider-ensure-op-supported " ns-path" )
3312
- (cider-sync-request:ns-path ns-name))
3321
+ (cljr--chop-prefix " file:"
3322
+ (cider-sync-request:ns-path ns-name)))
3313
3323
3314
3324
;;;### autoload
3315
3325
(defun cljr-create-fn-from-example ()
You can’t perform that action at this time.
0 commit comments