bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50228: [PATCH] 'command-completion-using-modes-p' doesn't work with


From: Lars Ingebrigtsen
Subject: bug#50228: [PATCH] 'command-completion-using-modes-p' doesn't work with multiple modes
Date: Fri, 27 Aug 2021 17:31:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Johannes Maier <johannes.maier@mailbox.org> writes:

> I've attached a patch that removes the duplicated checks in these two
> functions and simply calls 'command-completion-with-modes-p' from
> 'command-completion-using-modes-p'.  Now it works for me with one or
> more (major or minor) modes in 'interactive'.

Thanks, that does fix the problem.

However, the reason `command-completion-using-modes-p' is coded that way
is that `command-completion-with-modes-p' is slower in the common case,
and completion has to be fast.  But in the multiple-mode case, we can
indeed just call `command-completion-with-modes-p', so I've kept the
common case, but punted to `command-completion-with-modes-p' in the
multiple-mode case, and that seems to fix the issue.

> (I didn't see any tests for those functions, but I'm not sure how to go
> about those yet.  Could probably have look into those, too.)

Yes, there really should be tests in this area...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]