emacs-devel
[Top][All Lists]
Advanced

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

Should (icomplete-mode) explicitly disable fido-mode?


From: Andrew Schwartzmeyer
Subject: Should (icomplete-mode) explicitly disable fido-mode?
Date: Thu, 4 Jun 2020 10:49:05 -0700

Hi João,

I was wondering if this bit of code in icomplete-mode needs to be changed:

  (when icomplete-mode
    (fido-mode -1)...

Running (icomplete-mode) explicitly disables fido-mode, whereas running (fido-mode) makes it appear that icomplete-mode is enabled (sets it to t and runs its setup, without actually running the function icomplete-mode).

This causes third party packages which wrap icomplete-mode to easily break fido-mode, like in this issue: https://github.com/oantolin/icomplete-vertical/pull/13

icomplete-vertical calls (icomplete-mode), I think expecting it to be idempotent (not have any effect if icomplete-mode is already enabled), but in fact, since fido-mode is currently enabled this explicitly disables it and switches to the base icomplete-mode, as the mode functions icomplete-mode and fido-mode act like toggles of each other.

Should (icomplete-mode t) perhaps do nothing if fido-mode is already enabled? I’m not sure. Obviously the package can workaround it (given my patch), but I think it’s unexpected to have to avoid calling (icomplete-mode) if the icomplete-mode var is already t. What do you think?

Thanks,

Andy

reply via email to

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