@@ -179,6 +179,16 @@ The following commands are available:
179
179
(add-to-list 'completion-at-point-functions
180
180
#'inf-clojure-completion-at-point ))
181
181
182
+ (defun inf-clojure--endpoint-p (x )
183
+ " Return non-nil if and only if X is a valid endpoint.
184
+
185
+ A valid endpoint consists of a host and port
186
+ number (e.g. (\" localhost\" . 5555))."
187
+ (and
188
+ (listp x)
189
+ (stringp (car x))
190
+ (numberp (cdr x))))
191
+
182
192
(defcustom inf-clojure-lein-cmd " lein repl"
183
193
" The command used to start a Clojure REPL for Leiningen projects.
184
194
@@ -188,6 +198,8 @@ number (e.g. (\"localhost\" . 5555)). That's useful if you're
188
198
often connecting to a remote REPL process."
189
199
:type '(choice (string )
190
200
(cons string integer))
201
+ :risky #'stringp
202
+ :safe #'inf-clojure--endpoint-p
191
203
:package-version '(inf-clojure . " 2.0.0" ))
192
204
193
205
(define-obsolete-variable-alias 'inf-clojure-program 'inf-clojure-lein-cmd " 2.0.0" )
@@ -201,6 +213,8 @@ number (e.g. (\"localhost\" . 5555)). That's useful if you're
201
213
often connecting to a remote REPL process."
202
214
:type '(choice (string )
203
215
(cons string integer))
216
+ :risky #'stringp
217
+ :safe #'inf-clojure--endpoint-p
204
218
:package-version '(inf-clojure . " 2.0.0" ))
205
219
206
220
(defcustom inf-clojure-generic-cmd " lein repl"
@@ -212,6 +226,8 @@ number (e.g. (\"localhost\" . 5555)). That's useful if you're
212
226
often connecting to a remote REPL process."
213
227
:type '(choice (string )
214
228
(cons string integer))
229
+ :risky #' (stringp )
230
+ :safe #'inf-clojure--endpoint-p
215
231
:package-version '(inf-clojure . " 2.0.0" ))
216
232
217
233
(defvar-local inf-clojure-repl-type nil
0 commit comments