From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Confused by y-or-n-p Date: Fri, 25 Dec 2020 09:23:17 +0200 Message-ID: <83im8qnyca.fsf@gnu.org> References: <834kkcr1eo.fsf@gnu.org> <43b24209-fa65-0e26-7cbd-f99175a7ffd8@gmx.at> <87wnx7j5is.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7562"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at, rms@gnu.org, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 25 08:25:01 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kshTB-0001q3-GG for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Dec 2020 08:25:01 +0100 Original-Received: from localhost ([::1]:57532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kshTA-000187-Dw for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Dec 2020 02:25:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kshRy-0000h1-3q for emacs-devel@gnu.org; Fri, 25 Dec 2020 02:23:46 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54013) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kshRw-0003p3-DR; Fri, 25 Dec 2020 02:23:44 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2255 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kshRp-0002AH-Fu; Fri, 25 Dec 2020 02:23:37 -0500 In-Reply-To: <87wnx7j5is.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 24 Dec 2020 22:47:07 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:261720 Archived-At: > From: Juri Linkov > Cc: Eli Zaretskii , emacs-devel@gnu.org, Richard Stallman > > 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.