这是indexloc提供的服务,不要输入任何密码
Skip to content

Disable the #{} reader macro if a dispatch macro already exists on #\{ #132

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

Closed
wants to merge 1 commit into from

Conversation

lexi-lambda
Copy link
Member

I ran into a problem when using TR with my curly-fn meta-language, which installs its own dispatch macro on #\{. Since TR already uses that for annotations, this was overridden.

This implements @samth's idea thrown out on IRC to simply disable installing the readtable if a mapping already exists for #\{. This should never conflict with existing code, since the only way to modify a #lang readtable is through meta-langs, which are fairly rare as-is.

@samth
Copy link
Member

samth commented May 13, 2015

This needs a test, and probably a mention in the docs. Otherwise, looks good.

@lexi-lambda lexi-lambda force-pushed the cautious-readtable branch from 2bbf321 to adcdc27 Compare May 13, 2015 19:10
@lexi-lambda
Copy link
Member Author

Added a test and notes in the documentation.

@samth
Copy link
Member

samth commented May 14, 2015

Modulo that one comment, looks good to me.

@lexi-lambda lexi-lambda force-pushed the cautious-readtable branch from adcdc27 to 26f4d5c Compare May 14, 2015 21:26
@lexi-lambda
Copy link
Member Author

Okay, I linked to the readtable term in the docs, but I don't think it's possible to link to the 'dispatch-macro index.

@samth
Copy link
Member

samth commented May 14, 2015

Looks good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants