-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All suffix commands now must be accessed through fbound symbols
Even before, all suffix commands had to be associated with a symbol. Every suffix command is associated with a suffix object, and that symbol is what allows us to see that association. We often compare `this-command' with some constant symbols. For most commands that simply worked because they are ultimately defined using `defun' or `defalias'. For infix commands, which are defined inline in the definition of a prefix, we didn't do that, because we don't want those commands to be offered as completion candidates by `execute-extended-command'. We no longer have to do that because, since Emacs 28.2, there is an alternative mechanism to achieve the same. Previously infix commands were not installed in the function slot of their symbol, but in its `transient--infix-command' property. That complicated things a lot, so we remove it completely, instead of preserving it for older Emacs releases. If someone is bothered by infix commands being offered for completion, then they have to update to a recent Emacs release and customize `read-extended-command-predicate'. This also fixes how `transient--wrap-command' advises commands. Previously it used different approaches for commands accessed via a fboundp symbol and "anonymous" infix commands, and the latter did not actually work. As a side-note, we have to advice commands via fboundp symbols. Advising `this-command' instead, is not feasible, because we heavily rely on comparing the value of this variable with known symbols.
- Loading branch information
Showing
1 changed file
with
63 additions
and
102 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