From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Confused by y-or-n-p Date: Fri, 25 Dec 2020 09:42:10 +0100 Message-ID: <95b662f2-2492-4cf2-a09d-66b38b283db5@gmx.at> References: <834kkcr1eo.fsf@gnu.org> <43b24209-fa65-0e26-7cbd-f99175a7ffd8@gmx.at> <87wnx7j5is.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1473"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Richard Stallman , 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 09:43:24 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 1ksih2-0000H8-9S for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Dec 2020 09:43:24 +0100 Original-Received: from localhost ([::1]:42912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksih1-0003qH-A7 for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Dec 2020 03:43:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksifz-0003IC-MQ for emacs-devel@gnu.org; Fri, 25 Dec 2020 03:42:19 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:49013) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksifx-0005gT-NW; Fri, 25 Dec 2020 03:42:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1608885733; bh=Es5q1VVXJGcFUXMVdCzOpGpbCGl/bocjAaLo7W5sfvA=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=hZsk1dcBioH7t4LifvPO9JWmK9kvj+G8MjxI38jRD72zqxGDJAz8SxQCOpbxjsJt7 R3MUIeU6ZnqUJCyF1V3qSfPYMqiVq96y/TZ2FPzpL4OzIl0XQFqgIXcRG/3EIbbOPy BNCUmyEvfqkBhK1wWSfSZG9UBmdEfIcVw97o52Io= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.52]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MEV3C-1kr3yp02Xq-00FzfB; Fri, 25 Dec 2020 09:42:13 +0100 In-Reply-To: <87wnx7j5is.fsf@mail.linkov.net> Content-Language: en-US X-Provags-ID: V03:K1:LJhHXshKGkEeI0fkT3RBkWsOoonADNga09sgqUS+oRXIjXM3sIa luAeLSuUdDMwocUE86+JKEORXkTHxrTvNDr334X8omEEwrHQ25S4ZpCLWOL7WaHjujFtInO HOfE1XVICDhCzuW8tD4tK8/oYdyC89qCuzRxOOxSsZl4JMc5MMBIsKCIQRzOecleZvhcqHM 82V17F0ti/8/WiOYROIgA== X-UI-Out-Filterresults: notjunk:1;V03:K0:8G0Km6oFLwA=:AHrgbtjfIl7nedexiu3FC9 IcZYHZ1HSoUcKlXUfIkr93SegHrLaSVTtwtRBcwviCYjsMBYs9DIYYADu7lHREo6SuN/aVkwU ZRj+QRmK1bsT9925Zs6RY2w+hXWO8DGzKkLRjzg4g4gK4PatWC7M9/ktmg/uSK4Qzu0uOo4QN DekWvTFHDx8IucH6YC2wsruwL37E0Q93Ucpi2PC3KITToeuv2s/vv+vItqkzYDzSzR/Lk9DK7 3CSGPLE3V1dQmZN6o/RGEVS+PGFN/o1JNhDw9cKaqNUX9ZfRHfOFrJqU6uzlSyEKl2TJzauuq vwosgvuPQy10NZfkmUSdT4JsYsd4hs7/gzcKVTxegRJoGXrVpM+XQ362RL27Npx0JI8qMZjBF 72uyRcKRzOHoVs2Zs2CHz7oMyjOSQWYF5d5wfGjaHMUbseDNGOxP81gUDW7OaYnmLy/tuOsK9 dqXBGV1/dD3bjcp1IYWMPatmo+gYb/dBo2LKPcfeTGJ8/CQqbeNHWQrA2w6qt0stfPm9XpYsm AXupZGoh9ahwDyeFya01DmO08gmMyvbxrJ7Q5yhMkVWderdKRvP6NL9K9FmOsKg9ZdK3RJBqL AjbEGNraFa2o+6zQMcp4AflbJV+1KFzYl4fVFePrX7a3eU7Fx/QsU2PW4AsmUlqGxtyGXUx3/ LdMOslPM0N2D++/FHejTQ03FcRGavPhjmBYc4aSAzeFIQIboSV8H1zIWxbOlrXPj6ip2dYbrq 0N+5OHXR8uUnujT1uKzFQtkziGJ15PWNwWM0Sw9NbKot3hDGJBbDVFHD79jd4PeJfkF8i6RY Received-SPF: pass client-ip=212.227.17.21; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:261723 Archived-At: > 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) =3D=3D 3 && !strcmp (SSDATA (ans), "yes")) return unbind_to (count, Qt); if (SCHARS (ans) =3D=3D 2 && !strcmp (SSDATA (ans), "no")) return unbind_to (count, Qnil); leaving dialog boxes and the rest alone. martin