-
Notifications
You must be signed in to change notification settings - Fork 17
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
Support defining commands in noflet #17
base: master
Are you sure you want to change the base?
Support defining commands in noflet #17
Conversation
e0d7394
to
56831f7
Compare
Actually, this code is broken in a few corner cases. Give me some time to fix it up before merging. |
d2b71f3
to
e26a26f
Compare
Ok, I kind of nerd-sniped myself on this one and ended up rewriting the whole macro. I added two features. First, interactive functions (commands) are now supported. Second, there is a now shorthand for aliasing one function/command to another. Other than that, everything should keep working the same as before. The new version uses |
So this should fix #18 as well. |
|
Ok, I realized why I was confused. It turns out that there's no need for a (noflet ((next-line previous-line)
(previous-line next-line))
(next-line))
;; Can also invoke it as a command
(call-interactively 'next-line)) |
So we can close this, right? |
Well, do you want to merge it? |
I'm no wildly enthusiastic about something that totally rewrites the whole thing. How do we know it doesn't break anything? it won't be you fixing it if it does. Maybe offer an alternative with your implementation? |
This makes eldoc show the correct syntax.
There is currently only one trivial test, but more will be added.
e26a26f
to
4e0dde7
Compare
So, in answer to:
I finally got around to implementing a test suite. I also refactored my rewrite into a series of easy-to-digest commits each adding a single piece of functionality. To run the tests, you can check out my So anyway, at a minimum, I'd recommend merging the Lastly, if any of these are merged, the melpa recipe for noflet might need to be updated to only download the main elisp file and not the test files. |
Now if a function binding in "noflet" includes an interactive form, that
function will be available as a command in BODY, (i.e. BODY can invoke it
via "call-interactively").
Note that no corresponding feature is added for nolexflet.
Fixes #16.