GNU bug report logs -
#50228
[PATCH] 'command-completion-using-modes-p' doesn't work with multiple modes
Previous Next
Reported by: Johannes Maier <johannes.maier <at> mailbox.org>
Date: Fri, 27 Aug 2021 15:18:02 UTC
Severity: normal
Tags: patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 50228 <at> debbugs.gnu.org (full text, mbox):
Johannes Maier <johannes.maier <at> 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
This bug report was last modified 3 years and 263 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.