Skip to content

Commit aaaeef6

Browse files
arichiardibbatsov
authored andcommitted
Set string safety for all the form defcustoms
1 parent 7493ed8 commit aaaeef6

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

inf-clojure.el

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ number (e.g. (\"localhost\" . 5555)). That's useful if you're
226226
often connecting to a remote REPL process."
227227
:type '(choice (string)
228228
(cons string integer))
229-
:risky #'(stringp )
229+
:risky #'stringp
230230
:safe #'inf-clojure--endpoint-p
231231
:package-version '(inf-clojure . "2.0.0"))
232232

@@ -283,6 +283,7 @@ This format string should use `%s' to substitute a file name and
283283
should result in a Clojure form that will be sent to the inferior
284284
Clojure to load that file."
285285
:type 'string
286+
:safe #'stringp
286287
:package-version '(inf-clojure . "2.0.0"))
287288

288289
(define-obsolete-variable-alias 'inf-clojure-load-command 'inf-clojure-load-form "2.0.0")
@@ -293,6 +294,7 @@ This format string should use `%s' to substitute a file name and
293294
should result in a Clojure form that will be sent to the inferior
294295
Clojure to load that file."
295296
:type 'string
297+
:safe #'stringp
296298
:package-version '(inf-clojure . "2.0.0"))
297299

298300
(defcustom inf-clojure-load-form-planck "(load-file \"%s\")"
@@ -301,6 +303,7 @@ This format string should use `%s' to substitute a file name and
301303
should result in a Clojure form that will be sent to the inferior
302304
Clojure to load that file."
303305
:type 'string
306+
:safe #'stringp
304307
:package-version '(inf-clojure . "2.0.0"))
305308

306309
(defun inf-clojure-load-form ()
@@ -650,6 +653,7 @@ The prefix argument SWITCH-TO-REPL controls whether to switch to REPL after the
650653
"(clojure.repl/doc %s)"
651654
"Form to query inferior Clojure for a var's documentation."
652655
:type 'string
656+
:safe #'stringp
653657
:package-version '(inf-clojure . "2.0.0"))
654658

655659
(define-obsolete-variable-alias 'inf-clojure-var-doc-command 'inf-clojure-var-doc-form "2.0.0")
@@ -658,12 +662,14 @@ The prefix argument SWITCH-TO-REPL controls whether to switch to REPL after the
658662
"(lumo.repl/doc %s)"
659663
"Lumo form to query inferior Clojure for a var's documentation."
660664
:type 'string
665+
:safe #'stringp
661666
:package-version '(inf-clojure . "2.0.0"))
662667

663668
(defcustom inf-clojure-var-doc-form-planck
664669
"(planck.repl/doc %s)"
665670
"Planck form to query inferior Clojure for a var's documentation."
666671
:type 'string
672+
:safe #'stringp
667673
:package-version '(inf-clojure . "2.0.0"))
668674

669675
(defun inf-clojure-var-doc-form ()
@@ -680,18 +686,21 @@ If you are using REPL types, it will pickup the most approapriate
680686
"(clojure.repl/source %s)"
681687
"Form to query inferior Clojure for a var's source."
682688
:type 'string
689+
:safe #'stringp
683690
:package-version '(inf-clojure . "2.0.0"))
684691

685692
(defcustom inf-clojure-var-source-form-planck
686693
"(planck.repl/source %s)"
687694
"Planck form to query inferior Clojure for a var's source."
688695
:type 'string
696+
:safe #'stringp
689697
:package-version '(inf-clojure . "2.0.0"))
690698

691699
(defcustom inf-clojure-var-source-form-lumo
692700
"(lumo.repl/source %s)"
693701
"Lumo form to query inferior Clojure for a var's source."
694702
:type 'string
703+
:safe #'stringp
695704
:package-version '(inf-clojure . "2.0.0"))
696705

697706
(defun inf-clojure-var-source-form ()
@@ -715,6 +724,7 @@ If you are using REPL types, it will pickup the most approapriate
715724
(catch Throwable t nil))"
716725
"Form to query inferior Clojure for a function's arglists."
717726
:type 'string
727+
:safe #'stringp
718728
:package-version '(inf-clojure . "2.0.0"))
719729

720730
(define-obsolete-variable-alias 'inf-clojure-arglist-command 'inf-clojure-arglists-form "2.0.0")
@@ -726,6 +736,7 @@ If you are using REPL types, it will pickup the most approapriate
726736
(lumo.repl/get-arglists \"%s\"))"
727737
"Lumo form to query inferior Clojure for a function's arglists."
728738
:type 'string
739+
:safe #'stringp
729740
:package-version '(inf-clojure . "2.0.0"))
730741

731742
(defun inf-clojure-arglists-form ()
@@ -741,6 +752,7 @@ If you are using REPL types, it will pickup the most approapriate
741752
"(complete.core/completions \"%s\")"
742753
"Form to query inferior Clojure for completion candidates."
743754
:type 'string
755+
:safe #'stringp
744756
:package-version '(inf-clojure . "2.0.0"))
745757

746758
(define-obsolete-variable-alias 'inf-clojure-completion-command 'inf-clojure-completion-form "2.0.0")
@@ -752,12 +764,14 @@ If you are using REPL types, it will pickup the most approapriate
752764
@ret)"
753765
"Lumo form to query inferior Clojure for completion candidates."
754766
:type 'string
767+
:safe #'stringp
755768
:package-version '(inf-clojure . "2.0.0"))
756769

757770
(defcustom inf-clojure-completion-form-planck
758771
"(planck.repl/get-completions \"%s\")"
759772
"Planck form to query inferior Clojure for completion candidates."
760773
:type 'string
774+
:safe #'stringp
761775
:package-version '(inf-clojure . "2.0.0"))
762776

763777
(defun inf-clojure-completion-form ()
@@ -774,18 +788,21 @@ If you are using REPL types, it will pickup the most approapriate
774788
"(clojure.repl/dir %s)"
775789
"Form to show the public vars in a namespace."
776790
:type 'string
791+
:safe #'stringp
777792
:package-version '(inf-clojure . "2.0.0"))
778793

779794
(defcustom inf-clojure-ns-vars-form-lumo
780795
"(lumo.repl/dir %s)"
781796
"Lumo form to show the public vars in a namespace."
782797
:type 'string
798+
:safe #'stringp
783799
:package-version '(inf-clojure . "2.0.0"))
784800

785801
(defcustom inf-clojure-ns-vars-form-planck
786802
"(planck.repl/dir %s)"
787803
"Planck form to show the public vars in a namespace."
788804
:type 'string
805+
:safe #'stringp
789806
:package-version '(inf-clojure . "2.0.0"))
790807

791808
(defun inf-clojure-ns-vars-form ()
@@ -804,18 +821,21 @@ If you are using REPL types, it will pickup the most approapriate
804821
"(clojure.core/in-ns '%s)"
805822
"Form to set the namespace of the inferior Clojure process."
806823
:type 'string
824+
:safe #'stringp
807825
:package-version '(inf-clojure . "2.0.0"))
808826

809827
(defcustom inf-clojure-set-ns-form-planck
810828
"(in-ns '%s)"
811829
"Planck form to set the namespace of the inferior Clojure process."
812830
:type 'string
831+
:safe #'stringp
813832
:package-version '(inf-clojure . "2.0.0"))
814833

815834
(defcustom inf-clojure-set-ns-form-lumo
816835
"(in-ns '%s)"
817836
"Lumo form to set the namespace of the inferior Clojure process."
818837
:type 'string
838+
:safe #'stringp
819839
:package-version '(inf-clojure . "2.0.0"))
820840

821841
(defun inf-clojure-set-ns-form ()
@@ -834,19 +854,22 @@ If you are using REPL types, it will pickup the most approapriate
834854
(println (str var)))"
835855
"Form to invoke apropos."
836856
:type 'string
857+
:safe #'stringp
837858
:package-version '(inf-clojure . "2.0.0"))
838859

839860
(defcustom inf-clojure-apropos-form-lumo
840861
"(lumo.repl/apropos \"%s\")"
841862
"Planck form to invoke apropos."
842863
:type 'string
864+
:safe #'stringp
843865
:package-version '(inf-clojure . "2.0.0"))
844866

845867
(defcustom inf-clojure-apropos-form-planck
846868
"(doseq [var (sort (planck.repl/apropos \"%s\"))]
847869
(println (str var)))"
848870
"Planck form to invoke apropos."
849871
:type 'string
872+
:safe #'stringp
850873
:package-version '(inf-clojure . "2.0.0"))
851874

852875
(defun inf-clojure-apropos-form ()
@@ -865,12 +888,14 @@ If you are using REPL types, it will pickup the most approapriate
865888
"(clojure.core/macroexpand '%s)"
866889
"Form to invoke macroexpand."
867890
:type 'string
891+
:safe #'stringp
868892
:package-version '(inf-clojure . "2.0.0"))
869893

870894
(defcustom inf-clojure-macroexpand-form-planck
871895
"(macroexpand '%s)"
872896
"Planck form to invoke macroexpand."
873897
:type 'string
898+
:safe #'stringp
874899
:package-version '(inf-clojure . "2.0.0"))
875900

876901
(defun inf-clojure-macroexpand-form ()
@@ -888,12 +913,14 @@ If you are using REPL types, it will pickup the most approapriate
888913
"(clojure.core/macroexpand-1 '%s)"
889914
"Form to invoke macroexpand-1."
890915
:type 'string
916+
:safe #'stringp
891917
:package-version '(inf-clojure . "2.0.0"))
892918

893919
(defcustom inf-clojure-macroexpand-1-form-planck
894920
"(macroexpand-1 '%s)"
895921
"Planck form to invoke macroexpand-1."
896922
:type 'string
923+
:safe #'stringp
897924
:package-version '(inf-clojure . "2.0.0"))
898925

899926
(defun inf-clojure-macroexpand-1-form ()
@@ -1339,6 +1366,7 @@ for evaluation, therefore FORM should not include it."
13391366
"(find-ns 'lumo.repl)"
13401367
"Form to invoke in order to verify that we launched a Lumo REPL."
13411368
:type 'string
1369+
:safe #'stringp
13421370
:package-version '(inf-clojure . "2.0.0"))
13431371

13441372
;;;; Planck
@@ -1348,6 +1376,7 @@ for evaluation, therefore FORM should not include it."
13481376
"(find-ns 'planck.repl)"
13491377
"Form to invoke in order to verify that we launched a Planck REPL."
13501378
:type 'string
1379+
:safe #'stringp
13511380
:package-version '(inf-clojure . "2.0.0"))
13521381

13531382
(provide 'inf-clojure)

0 commit comments

Comments
 (0)