-
-
Notifications
You must be signed in to change notification settings - Fork 892
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a unified (lsp-interface INTERFACE ...) pcase form (#4559)
* Provide a unified (lsp-interface INTERFACE ...) pcase form This commit provides a new unified pcase form (lsp-interface INTERFACE ...) to replace the old per-interface (INTERFACE ...) forms -- the latter are now deprecated. (Unfortunately, I don't think there's a way to mark a pcase form as obsolete.) I've turned the existing pcase-defmacro definition into a helper function. The new pcase form delegates to that helper function, and the old pcase forms now delegate to the new form. This change addresses a few issues, which are detailed in #4430. In short: * The existing forms aren't namespaced. * The lsp-mode package adds hundreds of forms, which each add several lines to pcase's generated docstring, adding up to over 1000 lines. * Starting in Emacs 31, the number of forms added by lsp-mode causes a noticeable slowdown when loading the interactive help for pcase. * Add a comment and TODO about deprecating per-interface pcase forms * Improve docstring for (lsp-interface ...) pcase form I've tried to summarize the behavior of the existing implementation. * Replace per-interface pcase forms with the new unified form I used ripgrep to search for all occurrences of `pcase`, and then checked each to see if it was using a pattern that looked like an LSP interface name. It's very possible I missed something, but hopefully not. * Remove the per-interface pcase forms The consensus in #4430 is that we're ok with making this breaking change and communicating it in the CHANGELOG. I've replaced all uses in lsp-mode itself. * Add CHANGELOG entry for pcase changes I'm an Org newb, so hopefully this is well-formatted.
- Loading branch information
1 parent
a52ef29
commit 522b1ad
Showing
5 changed files
with
58 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters