Create a Pcase pattern that works like -let.#413
Create a Pcase pattern that works like -let.#413okamsn wants to merge 2 commits intomagnars:masterfrom
-let.#413Conversation
672d344 to
abc48e2
Compare
- Create file `dash-pcase.el`. - Copy tests of `-let` (except for parallel binding tests) to test pattern in `pcase` and `pcase-let`. - Update `README.md` and Info documentation using `make`.
|
This is now ready for review. I've copied the tests of Should the Do you want any changes in how the code works or its style? Thank you. |
- Create a substitute for `gensym` if `gensym` is not available. - Warn that `dash-pcase` not supported in Emacs versions less than 25.1. - Only run tests if `pcase-defmacro` is bound.
|
I have updated the code to use How would you like to handle Emacs versions when |
|
Another option would be making @basil-conto, do you have an opinion on how to handle |
I don't really have an opinion on this; either way would work for me (I'm also quite unfamiliar with this part of Dash). @Fuco1, @magnars any thoughts?
IIUC this feature is about hooking Dash destructuring into IMO if it is not possible, Dash does not need to do anything: users running Emacs 24 should neither expect Dash to invent a |
This PR is the beginning of a
pcasepattern that works like-let. For me, this would resolve #376 (which I opened).Before I copy the tests for
-letand work through the edge cases of the pattern, would you be willing to merge apcasepattern that works like-let?