Skip to content
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

Consider adding a prefix to wrap- functions in the smartparens article #4

Closed
Fuco1 opened this issue Oct 3, 2018 · 8 comments
Closed

Comments

@Fuco1
Copy link

Fuco1 commented Oct 3, 2018

In https://ebzzry.io/en/emacs-pairs/#wrapping you show a macro for generating a bunch of wrap-* functions all at once.

Many people seem to copy the config at the bottom of your post but without the macro and they get confused because the functions do not exist.

Fuco1/smartparens#931
Fuco1/smartparens#899

I think either adding your own personal prefix or maybe adding sp-wrap-*... or maybe we could even simply include it in smartparens by default and be done with it :D What do you think?

@ebzzry
Copy link
Owner

ebzzry commented Oct 4, 2018

Thanks for pointing that out. Let me handle that.

@ebzzry
Copy link
Owner

ebzzry commented Oct 4, 2018

I copied the code snippet of the macro that defines the macros, from the middle part of the article, to the last part.

A preview of it is available here, while the Markdown source is available here. The main article here should reflect the changes soon.

Do you think that suffices?

@Fuco1
Copy link
Author

Fuco1 commented Oct 4, 2018

Maybe one cool thing to add would be some sort of docstring to the macro, so that when people see/copy it it is obvious that it's a function that does something... or at least there's some english people can read, since not everyone programs elisp they might not understand the significance.

@Fuco1
Copy link
Author

Fuco1 commented Oct 4, 2018

Someone recently posted the article on reddit so that's probably where the recent surge comes from. If you search github for some of the lines from that config there is hundreds of people using it... pretty good reach if I may say so :D Which makes it all so more annoying when things break hehe.

@ebzzry
Copy link
Owner

ebzzry commented Oct 4, 2018

Maybe one cool thing to add would be some sort of docstring to the macro, so that when people see/copy it it is obvious that it's a function that does something... or at least there's some english people can read, since not everyone programs elisp they might not understand the significance.

That’s a good idea. I just added a docstring to the macro.

@ebzzry
Copy link
Owner

ebzzry commented Oct 4, 2018

Which makes it all so more annoying when things break hehe.

That’s true.

@ebzzry ebzzry closed this as completed Oct 4, 2018
@Fuco1
Copy link
Author

Fuco1 commented Oct 4, 2018

Thanks!

@ebzzry
Copy link
Owner

ebzzry commented Oct 4, 2018

Thanks!

Anytime!

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

No branches or pull requests

2 participants