-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! Validate .spacemacs variables.
fixes #14535 #14537 #14529 #10638 (comment)
- Loading branch information
1 parent
3e156ec
commit 5830e72
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5830e72
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JAremko I added a fix with: 3d1b8865d
Do you know if it is possible to validate that the only valid sexps are of the form
(vim :variables (cons symbol sexp)
?5830e72
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops. Braces and sleep deprivation finally got me.
@syl20bnr Yeah. I want to fork
validate.el
add a couple of new "ephemeral types" such as range (for percentage) and (plist with a head) not sure how to name it.. Headed plsit ?My best name so far is
(plist-for <head-type> <key> <value-type> ... <key> <value-type>)
where validator will check type of value associated with every specified key. Another new type is a predicate - for the case if we can't figure out what to do, just run a function on a value and if it returns true - it's valid. Those types will be "ephemeral" in the sense that for emacs customization system they will look like more general ones. For example.plist-for
will look like(cons <head-type> sexp)))
. This is needed for layer configs since they are available via customization menu.5830e72
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great ideas. The more accurate the schema, the better. In your example should it be
(plist-for (cons <head-type> sexp))
instead ?