File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,12 @@ This should usually be a combination of `inf-clojure-prompt' and
179
179
:type 'regexp
180
180
:group 'inf-clojure )
181
181
182
+ (defcustom inf-clojure-prompt-when-set-ns t
183
+ " Controls whether to prompt by default when switching namespace."
184
+ :type '(choice (const :tag " always" t )
185
+ (const :tag " never" nil ))
186
+ :group 'inf-clojure )
187
+
182
188
(defvar inf-clojure-buffer nil
183
189
" The current inf-clojure process buffer.
184
190
@@ -621,7 +627,11 @@ See variable `inf-clojure-ns-vars-command'."
621
627
(defun inf-clojure-set-ns (ns )
622
628
" Set the ns of the inferior Clojure process to NS.
623
629
Defaults to the ns of the current buffer."
624
- (interactive (inf-clojure-symprompt " Set ns to" (clojure-find-ns)))
630
+ (interactive (list (if inf-clojure-prompt-when-set-ns
631
+ (inf-clojure-symprompt " Set ns to" (clojure-find-ns))
632
+ (clojure-find-ns))))
633
+ (when (or (not ns) (equal ns " " ))
634
+ (user-error " No namespace selected" ))
625
635
(comint-proc-query (inf-clojure-proc) (format inf-clojure-set-ns-command ns)))
626
636
627
637
(defun inf-clojure-apropos (var )
You can’t perform that action at this time.
0 commit comments