Skip to content

Commit

Permalink
racket-expand-hiding: Add defcustom types for rules
Browse files Browse the repository at this point in the history
  • Loading branch information
greghendershott committed Jan 28, 2024
1 parent be2dce3 commit bbbf67b
Showing 1 changed file with 34 additions and 9 deletions.
43 changes: 34 additions & 9 deletions racket-custom.el
Original file line number Diff line number Diff line change
Expand Up @@ -575,15 +575,40 @@ ignore POS. Examples: `racket-show-echo-area' and
(defcustom racket-expand-hiding 'standard
"The macro hiding policy for commands like `racket-expand-file'."
:tag "Racket Expand Hiding"
:type '(choice (const :tag "Disable" disable)
(const :tag "Standard" standard)
(list :tag "Custom" :value (list t t t t nil)
(boolean :tag "Hide racket syntax")
(boolean :tag "Hide library syntax")
(boolean :tag "Hide contracts")
(boolean :tag "Hide phase>0")
(repeat :tag "More rules (see macro-debugger/model/hiding-policies \"Entry\" and \"Condition\")"
sexp)))
:type '(choice
(const :tag "Disable" disable)
(const :tag "Standard" standard)
(list :tag "Custom" :value (t t t t nil)
(boolean :tag "Hide racket syntax")
(boolean :tag "Hide library syntax")
(boolean :tag "Hide contracts")
(boolean :tag "Hide phase>0")
(repeat
:tag "More rules (see macro-debugger/model/hiding-policies \"Entry\" and \"Condition\")"
(list (choice (const :tag "show-if" show-if)
(const :tag "hide-if" hide-if))
(choice (const :tag "lexical" (lexical))
(const :tag "unbound" (unbound))
(const :tag "from-kernel-module" (from-kernel-module))
(list :tag "from-def-module"
(const from-def-module)
(choice :tag "module path" string symbol))
(list :tag "from-nom-module"
(const from-nom-module)
(choice :tag "module path" string symbol))
(list :tag "from-collection"
(const from-collection)
(repeat :tag "collection-string" string))
(list :tag "symbol=?"
(const symbol=?)
(symbol))
(list :tag "symbol-like"
(const symbol-like)
(string :tag "racket regexp"))
(list :tag "phase>=?"
(const phase>=?)
(natnum :tag "natural number"))
(sexp :tag "sexp"))))))
:group 'racket-other)

;;; Faces
Expand Down

0 comments on commit bbbf67b

Please sign in to comment.