[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function
From: |
Lars Ingebrigtsen |
Subject: |
Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function |
Date: |
Sat, 11 Jun 2022 18:11:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> I see that the `minibuffer-completion-confirm` function completely
>>> replaces the usual handling of require-match (i.e. the attempt to fix
>>> the case and the prompting for confirmation).
>> (You probably noticed it, but in case not -- I didn't change that code,
>> I just changed the indentation.)
>
> What I meant was that the branch you added to the `cond` overrides the
> rest of the `cond` (the part you reindented).
Ah, yes, that's true. But REQUIRE-MATCH can't both be a function and
`confirm' at the same time, and adding a new parameter for this use case
seemed a bit overboard.
(And the function can implement its own confirm-ish action if it wants
that.)
> Understanding the subtleties can be difficult, but a good general rule
> I try to follow in such cases is to provide a function that the new
> function-hook can use to get back the old behavior.
>
> IOW, arrange your code such that the user can provide a function
> `mimic-t` where the resulting behavior is identical to providing `t`
> (and same thing for the other supported values).
> AFAICT it's currently virtually impossible (at least not without inside
> knowledge of how the minibuffer.el code is written).
But is that useful?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function, Stefan Monnier, 2022/06/10
- Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function, Lars Ingebrigtsen, 2022/06/11
- Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function, Stefan Monnier, 2022/06/11
- Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function,
Lars Ingebrigtsen <=
- Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function, Stefan Monnier, 2022/06/11
- Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function, Lars Ingebrigtsen, 2022/06/12
- Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function, Stefan Monnier, 2022/06/12
- Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function, Lars Ingebrigtsen, 2022/06/13
- Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function, Stefan Monnier, 2022/06/13
- Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function, Lars Ingebrigtsen, 2022/06/14
- Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function, Stefan Monnier, 2022/06/14
- Re: master 49e06183f5 1/3: Allow REQUIRE-MATCH to be a function, Lars Ingebrigtsen, 2022/06/16