-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support #:auto-value for defparam and defthing #391
Conversation
6bb2641
to
d9c234a
Compare
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.
Resyntax analyzed 3 files in this pull request and found no issues.
This strategy is not foolproof though. For example, https://github.com/racket/scribble/blob/master/scribble-doc/scribblings/scribble/utils.rkt#L12-L13 bounces the for-label binding, but not the phase 0 binding. So without |
Switching from the third result to the first result ( |
0cad1b2
to
7d6181d
Compare
Addressed feedback by @rocketnia. |
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.
Looks ok to me. Ignore nit-picking comments as you see fit.
Manually specifying `#:value` could be cumbersome. An example is `html-empty-tags` from the `xml` collection, which is a list of more than 10 symbols. It is also error-prone, and could be out-of-sync from the actual value. This PR adds a support for `#:auto-value` in `defparam` and `defthing` to automatically query the value from the `for-label` binding. The original idea of this PR is from racket/racket#4807. Thanks to @LiberalArtist who recommended an implementation strategy, and @rocketnia for feedback.
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.
Resyntax analyzed 3 files in this pull request and found no issues.
Oof, I should have bumped the version and added a history note. Will push a fix. |
Manually specifying
#:value
could be cumbersome. An example ishtml-empty-tags
from thexml
collection, which is a list of more than 10 symbols.It is also error-prone, and could be out-of-sync from the actual value.
This PR adds a support for
#:auto-value
indefparam
anddefthing
to automatically query the value from thefor-label
binding.Thanks to @LiberalArtist for the help in racket/racket#4807.