[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Confused by y-or-n-p
From: |
martin rudalics |
Subject: |
Re: Confused by y-or-n-p |
Date: |
Fri, 25 Dec 2020 09:42:10 +0100 |
> Here is a possible way to make the minibuffer modal:
>
> (defun minibuffer-lock ()
> (when (active-minibuffer-window)
> (select-window (active-minibuffer-window))))
>
> (add-hook 'post-command-hook #'minibuffer-lock)
That's too harsh because it would affect all minibuffer interactions.
>> And while we're there we could also try to relieve some of our .emacs
>> files (mine included) of those
>>
>> (defalias 'yes-or-no-p 'y-or-n-p)
>>
>> by providing an option that accomplishes the necessary mapping.
>
> One complication is that currently yes-or-no-p is implemented in C,
> so using a new user option in it is not straightforward.
I would just amend this part
if (SCHARS (ans) == 3 && !strcmp (SSDATA (ans), "yes"))
return unbind_to (count, Qt);
if (SCHARS (ans) == 2 && !strcmp (SSDATA (ans), "no"))
return unbind_to (count, Qnil);
leaving dialog boxes and the rest alone.
martin
- Re: Confused by y-or-n-p, (continued)
- Re: Confused by y-or-n-p, Eli Zaretskii, 2020/12/25
- Re: Confused by y-or-n-p, martin rudalics, 2020/12/25
- Re: Confused by y-or-n-p, Richard Stallman, 2020/12/26
- Re: Confused by y-or-n-p, Jean Louis, 2020/12/26
- Re: Confused by y-or-n-p, martin rudalics, 2020/12/26
- Re: Confused by y-or-n-p, Richard Stallman, 2020/12/26
- Re: Confused by y-or-n-p, Eli Zaretskii, 2020/12/26
- Re: Confused by y-or-n-p, Richard Stallman, 2020/12/27
- Re: Confused by y-or-n-p, Juri Linkov, 2020/12/25
- Re: Confused by y-or-n-p, Eli Zaretskii, 2020/12/25
- Re: Confused by y-or-n-p,
martin rudalics <=
- Re: Confused by y-or-n-p, Eli Zaretskii, 2020/12/25
- Re: Confused by y-or-n-p, martin rudalics, 2020/12/25
- Re: Confused by y-or-n-p, Richard Stallman, 2020/12/26
- Sv: Confused by y-or-n-p, arthur miller, 2020/12/26
- Re: Confused by y-or-n-p, Richard Stallman, 2020/12/27
- Re: Confused by y-or-n-p, Eli Zaretskii, 2020/12/26
- Re: Confused by y-or-n-p, martin rudalics, 2020/12/26
- Re: Confused by y-or-n-p, Richard Stallman, 2020/12/27
- RE: Confused by y-or-n-p, Drew Adams, 2020/12/26
Re: Confused by y-or-n-p, Richard Stallman, 2020/12/24