emacs-devel
[Top][All Lists]
Advanced

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

Re: Confused by y-or-n-p


From: Eli Zaretskii
Subject: Re: Confused by y-or-n-p
Date: Fri, 25 Dec 2020 09:23:17 +0200

> From: Juri Linkov <juri@linkov.net>
> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org,  Richard Stallman
>  <rms@gnu.org>
> Date: Thu, 24 Dec 2020 22:47:07 +0200
> 
> Indeed.  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)

Would something like that work to give users an option discussed in
this thread for y-or-n-p?  If so, can you please show a patch for
that?

> > 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.

What are the difficulties?  You can call Lisp from C, given an option,
which is what I think Martin asked for.



reply via email to

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