48
48
49
49
(defgroup inf-clojure nil
50
50
" Run an external Clojure process (REPL) in an Emacs buffer."
51
- :group 'clojure )
51
+ :prefix " inf-clojure-"
52
+ :group 'clojure
53
+ :link '(url-link :tag " GitHub" " https://github.com/clojure-emacs/inf-clojure" )
54
+ :link '(emacs-commentary-link :tag " Commentary" " inf-clojure" ))
52
55
53
56
(defconst inf-clojure-version " 1.5.0-snapshot"
54
57
" The current version of `inf-clojure' ." )
57
60
" If non-nil, the prompt will be read-only.
58
61
59
62
Also see the description of `ielm-prompt-read-only' ."
60
- :type 'boolean
61
- :group 'inf-clojure )
63
+ :type 'boolean )
62
64
63
65
(defcustom inf-clojure-filter-regexp
64
66
" \\ `\\ s *\\ (:\\ (\\ w\\ |\\ s_\\ )\\ )?\\ s *\\ '"
65
67
" What not to save on inferior Clojure's input history.
66
68
Input matching this regexp is not saved on the input history in Inferior Clojure
67
69
mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword
68
70
\( as in :a, :c, etc.)"
69
- :type 'regexp
70
- :group 'inf-clojure )
71
+ :type 'regexp )
71
72
72
73
(defvar inf-clojure-mode-map
73
74
(let ((map (copy-keymap comint-mode-map)))
@@ -160,45 +161,38 @@ of command, consisting of a host and port
160
161
number (e.g. (\" localhost\" . 5555)). That's useful if you're
161
162
often connecting to a remote REPL process."
162
163
:type '(choice (string )
163
- (cons string integer))
164
- :group 'inf-clojure )
164
+ (cons string integer)))
165
165
166
166
(defcustom inf-clojure-load-command " (clojure.core/load-file \" %s\" )\n "
167
167
" Format-string for building a Clojure expression to load a file.
168
168
This format string should use `%s' to substitute a file name
169
169
and should result in a Clojure expression that will command the inferior Clojure
170
170
to load that file."
171
- :type 'string
172
- :group 'inf-clojure )
171
+ :type 'string )
173
172
174
173
(defcustom inf-clojure-prompt " ^[^=> \n ]+=> *"
175
174
" Regexp to recognize prompts in the Inferior Clojure mode."
176
- :type 'regexp
177
- :group 'inf-clojure )
175
+ :type 'regexp )
178
176
179
177
(defcustom inf-clojure-subprompt " *#_=> *"
180
178
" Regexp to recognize subprompts in the Inferior Clojure mode."
181
- :type 'regexp
182
- :group 'inf-clojure )
179
+ :type 'regexp )
183
180
184
181
(defcustom inf-clojure-comint-prompt-regexp " ^\\ ( *#_\\ |[^=> \n ]+\\ )=> *"
185
182
" Regexp to recognize both main prompt and subprompt for comint.
186
183
This should usually be a combination of `inf-clojure-prompt' and
187
184
`inf-clojure-subprompt' ."
188
- :type 'regexp
189
- :group 'inf-clojure )
185
+ :type 'regexp )
190
186
191
187
(defcustom inf-clojure-prompt-on-set-ns t
192
188
" Controls whether to prompt when switching namespace."
193
189
:type '(choice (const :tag " always" t )
194
- (const :tag " never" nil ))
195
- :group 'inf-clojure )
190
+ (const :tag " never" nil )))
196
191
197
192
(defcustom inf-clojure-repl-use-same-window nil
198
193
" Controls whether to display the REPL buffer in the current window or not."
199
194
:type '(choice (const :tag " same" t )
200
- (const :tag " different" nil ))
201
- :group 'inf-clojure )
195
+ (const :tag " different" nil )))
202
196
203
197
(defvar inf-clojure-buffer nil
204
198
" The current inf-clojure process buffer.
@@ -463,8 +457,7 @@ describing the last `inf-clojure-load-file' command.")
463
457
If it's loaded into a buffer that is in one of these major modes, it's
464
458
considered a Clojure source file by `inf-clojure-load-file' .
465
459
Used by this command to determine defaults."
466
- :type '(repeat symbol)
467
- :group 'inf-clojure )
460
+ :type '(repeat symbol))
468
461
469
462
(defun inf-clojure-load-file (&optional switch-to-repl file-name )
470
463
" Load a Clojure file FILE-NAME into the inferior Clojure process.
@@ -498,14 +491,12 @@ The prefix argument SWITCH-TO-REPL controls whether to switch to REPL after the
498
491
(defcustom inf-clojure-var-doc-command
499
492
" (clojure.repl/doc %s)\n "
500
493
" Command to query inferior Clojure for a var's documentation."
501
- :type 'string
502
- :group 'inf-clojure )
494
+ :type 'string )
503
495
504
496
(defcustom inf-clojure-var-source-command
505
497
" (clojure.repl/source %s)\n "
506
498
" Command to query inferior Clojure for a var's source."
507
- :type 'string
508
- :group 'inf-clojure )
499
+ :type 'string )
509
500
510
501
(defcustom inf-clojure-arglist-command
511
502
" (try
@@ -515,45 +506,38 @@ The prefix argument SWITCH-TO-REPL controls whether to switch to REPL after the
515
506
(clojure.core/read-string \" %s\" ))))
516
507
(catch Throwable t nil))\n "
517
508
" Command to query inferior Clojure for a function's arglist."
518
- :type 'string
519
- :group 'inf-clojure )
509
+ :type 'string )
520
510
521
511
(defcustom inf-clojure-completion-command
522
512
" (complete.core/completions \" %s\" )\n "
523
513
" Command to query inferior Clojure for completion candidates."
524
- :type 'string
525
- :group 'inf-clojure )
514
+ :type 'string )
526
515
527
516
(defcustom inf-clojure-ns-vars-command
528
517
" (clojure.repl/dir %s)\n "
529
518
" Command to show the public vars in a namespace."
530
- :type 'string
531
- :group 'inf-clojure )
519
+ :type 'string )
532
520
533
521
(defcustom inf-clojure-set-ns-command
534
522
" (clojure.core/in-ns '%s)\n "
535
523
" Command to set the namespace of the inferior Clojure process."
536
- :type 'string
537
- :group 'inf-clojure )
524
+ :type 'string )
538
525
539
526
(defcustom inf-clojure-apropos-command
540
527
" (doseq [var (sort (clojure.repl/apropos \" %s\" ))]
541
528
(println (str var)))\n "
542
529
" Command to invoke apropos."
543
- :type 'string
544
- :group 'inf-clojure )
530
+ :type 'string )
545
531
546
532
(defcustom inf-clojure-macroexpand-command
547
533
" (clojure.core/macroexpand '%s)\n "
548
534
" Command to invoke macroexpand."
549
- :type 'string
550
- :group 'inf-clojure )
535
+ :type 'string )
551
536
552
537
(defcustom inf-clojure-macroexpand-1-command
553
538
" (clojure.core/macroexpand-1 '%s)\n "
554
539
" Command to invoke macroexpand-1."
555
- :type 'string
556
- :group 'inf-clojure )
540
+ :type 'string )
557
541
558
542
; ;; Ancillary functions
559
543
; ;; ===================
0 commit comments