[Top][All Lists]

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

Re: Questions about the `completing-read-function' interface

From: Stefan Monnier
Subject: Re: Questions about the `completing-read-function' interface
Date: Fri, 17 Apr 2015 15:05:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> You mean to use code like this:
> (if ivy-mode
>     (add-function :override completing-read-function 'ivy-completing-read)
>   (remove-function completing-read-function 'ivy-completing-read))


> This can solve the problem if all packages adhere to this rule
> simultaneously.

It works better if all packages use it, indeed, but even if only
ivy-mode uses it, it handles the

    M-x ivy-mode RET
    M-x helm-mode RET
    M-x ivy-mode RET

case better.

> But this sequence doesn't:
> - ivy-mode
> - helm-mode
> - helm-mode

Indeed, it doesn't fix this sequence, but it doesn't make it worse either.

> Since which Emacs version is `add-function` available?


> Would you recommend the above approach, possibly in the manual?

Yes, I recommend it for all modifications of `*-function' variables.


reply via email to

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