File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 5
5
### New Features
6
6
7
7
* [ #34 ] ( https://github.com/clojure-emacs/inf-clojure/pull/34 ) : Add support for socket REPL connections.
8
+ * [ #46 ] ( https://github.com/clojure-emacs/inf-clojure/pull/46 ) : Make it possible to disable prompt on ` inf-clojure-set-ns ` .
8
9
* New interactive command ` inf-clojure-display-version ` .
9
10
10
11
### Bugs Fixed
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-on-set-ns t
183
+ " Controls whether to prompt 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
@@ -620,8 +626,13 @@ See variable `inf-clojure-ns-vars-command'."
620
626
621
627
(defun inf-clojure-set-ns (ns )
622
628
" Set the ns of the inferior Clojure process to NS.
623
- Defaults to the ns of the current buffer."
624
- (interactive (inf-clojure-symprompt " Set ns to" (clojure-find-ns)))
629
+ Defaults to the ns of the current buffer, always prompting before
630
+ setting, unless `inf-clojure-prompt-on-set-ns` is nil."
631
+ (interactive (list (if inf-clojure-prompt-on-set-ns
632
+ (inf-clojure-symprompt " Set ns to" (clojure-find-ns))
633
+ (clojure-find-ns))))
634
+ (when (or (not ns) (equal ns " " ))
635
+ (user-error " No namespace selected" ))
625
636
(comint-proc-query (inf-clojure-proc) (format inf-clojure-set-ns-command ns)))
626
637
627
638
(defun inf-clojure-apropos (var )
You can’t perform that action at this time.
0 commit comments