@@ -1193,16 +1193,21 @@ See command `cider-mode'."
1193
1193
" Perform up using NS."
1194
1194
(mapconcat 'identity (butlast (split-string ns " \\ ." )) " ." ))
1195
1195
1196
- (defun cider-ido-var-select (ido-callback cider-ido-ns selected targets )
1197
- " Peform ido select using SELECTED and TARGETS."
1196
+ (defun cider-ido-var-select (prompt ido-callback cider-ido-ns selected targets )
1197
+ " Peform ido select using SELECTED and TARGETS.
1198
+ If SELECTED is \" ..\" then another selection is made for vars in the parent namespace of
1199
+ CIDER-IDO-NS using PROMPT.
1200
+ If SELECTED is a namespace then another selection is made against that namespace
1201
+ using PROMPT.
1202
+ Once a selecton is made IDO-CALLBACK is called with SELECTED."
1198
1203
; ; TODO: immediate RET gives "" as selected for some reason
1199
1204
; ; this is an OK workaround though
1200
1205
(cond ((equal " " selected)
1201
- (cider-ido-var-select ido-callback cider-ido-ns (car targets) targets))
1206
+ (cider-ido-var-select prompt ido-callback cider-ido-ns (car targets) targets))
1202
1207
((equal " /" (substring selected -1 )) ; selected a namespace
1203
- (cider-ido-read-var (substring selected 0 -1 ) ido-callback))
1208
+ (cider-ido-read-var prompt (substring selected 0 -1 ) ido-callback))
1204
1209
((equal " .." selected)
1205
- (cider-ido-read-var (cider-ido-up-ns cider-ido-ns) ido-callback))
1210
+ (cider-ido-read-var prompt (cider-ido-up-ns cider-ido-ns) ido-callback))
1206
1211
; ; non ido variable selection techniques don't return qualified symbols, so this shouldn't either
1207
1212
(t (funcall ido-callback selected))))
1208
1213
@@ -1222,11 +1227,11 @@ See command `cider-mode'."
1222
1227
(cider-tooling-eval form (cider-ido-read-sym-handler label callback (current-buffer ))
1223
1228
nrepl-buffer-ns))
1224
1229
1225
- (defun cider-ido-read-var (ns ido-callback )
1230
+ (defun cider-ido-read-var (prompt ns ido-callback )
1226
1231
" Perform ido read var in NS using IDO-CALLBACK."
1227
- (cider-ido-read-sym-form " Var: " (prin1-to-string (cider-ido-form ns))
1232
+ (cider-ido-read-sym-form prompt (prin1-to-string (cider-ido-form ns))
1228
1233
(lambda (selected targets )
1229
- (cider-ido-var-select ido-callback ns selected targets))))
1234
+ (cider-ido-var-select prompt ido-callback ns selected targets))))
1230
1235
1231
1236
(defun cider-ido-fns-form (ns )
1232
1237
" Construct a Clojure form for reading fns using supplied NS."
@@ -1259,7 +1264,7 @@ if there is no symbol at point, or if QUERY is non-nil."
1259
1264
(let ((symbol-name (cider-symbol-at-point)))
1260
1265
(cond ((not (or current-prefix-arg query (not symbol-name)))
1261
1266
(funcall callback symbol-name))
1262
- (ido-mode (cider-ido-read-var nrepl-buffer-ns callback))
1267
+ (ido-mode (cider-ido-read-var prompt nrepl-buffer-ns callback))
1263
1268
(t (funcall callback (read-from-minibuffer prompt symbol-name))))))
1264
1269
1265
1270
(defun cider-doc-buffer-for (symbol )
0 commit comments