From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: 29.0.60; keymap-local-set and keymap-global-set became less strict Date: Wed, 01 Feb 2023 17:42:04 -0500 Message-ID: References: <5876987d-2479-f512-5767-218c8c16a909@daniel-mendler.de> <875ycngyji.fsf@gnus.org> <87zg9zvzuc.fsf@gmail.com> <831qna3frm.fsf@gnu.org> <87mt5yogct.fsf@gmail.com> <83y1pi1wz4.fsf@gnu.org> <87ilgmodk4.fsf@gmail.com> <83mt5y1r5u.fsf@gnu.org> <87bkmdo8e4.fsf@gmail.com> <831qn91qo0.fsf@gnu.org> <137753af-777d-2da3-c111-7e2d414633f1@daniel-mendler.de> <83sffpze9h.fsf@gnu.org> <309dee07-e404-4f84-a839-8b99815376f8@daniel-mendler.de> <83mt5xz42d.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30387"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , rpluim@gmail.com, larsi@gnus.org, emacs-devel@gnu.org To: Daniel Mendler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 01 23:43:00 2023 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 1pNLoh-0007fm-7N for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Feb 2023 23:42:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNLo4-00063d-1J; Wed, 01 Feb 2023 17:42:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNLnx-00063O-3N for emacs-devel@gnu.org; Wed, 01 Feb 2023 17:42:13 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNLnv-0008H9-48; Wed, 01 Feb 2023 17:42:12 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 01D6E81145; Wed, 1 Feb 2023 17:42:09 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3B77B80223; Wed, 1 Feb 2023 17:42:07 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1675291327; bh=IAs4MjlIY6o/uMBY7lablX5ixovAyplPjs7/ArMsar8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=VixDMLtoTiCbotR20pgLelSdvTjFGuHcrw21jd+j0lyi/VY0348VIFN9z5nuGcqZo A+1F/ZooloYHADdA7EqvvuOIYgeAoMg7BmUI4ii8dFXPTLWqiJGBVLG5pP8ID1gdCW l7UKJMKlfk3A2qmwPdNCwZSBRxbMg5rk7mtA3xUH3WMYX45qs6cdeXxiS9/r9SVl5t 8dqrC3GQQQrEPCKh0LQc5pbU6wN/6K9SAj1+i9S+z27x7sl8BCXAa/D+bH4ytmXpC0 9ZFdfq5q5hYe+wvaVueDdaAbfPkcFje4D2gv/1/xZsot4R1C4FA+IGUhb9FVMAJFqs Xo906mrgn6fOA== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 247B7120ED1; Wed, 1 Feb 2023 17:42:07 -0500 (EST) In-Reply-To: (Daniel Mendler's message of "Wed, 1 Feb 2023 21:22:21 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302879 Archived-At: >>> I think call-interactively-p would be better for this use case, but >>> that's my opinion versus yours. >> Have you ever looked at the implementation of `called-interactively-p`? > I guess there is no doubt that we all agree that the implementation is > not great. The problem is that it's not the fault of the implementation. The idea of having it as a function is fundamentally flawed, which is why the function can be nothing but a mess. > But I would not consider it prohibitively bad, such that it > should never ever be used in new code. If that is the case why is the > function not officially deprecated? `called-interactive-p` is in the same category as `advice-add`. It's great that we have it, but you should only use it when there's no other way. > To be clear, I was aware of the recommendation to avoid > `called-interactively-p' and iirc I have not used it in any of my > packages. It is a kludge to use it, but using "hidden arguments" and > "advertised calling convention" seems as much a kludge in my eyes. Maybe they're kludges, but at least they have a well defined meaning. `called-interactively-p` is in a completely different category of kludges. > The problem with the hidden INTERACTIVE (or ALLOW-VECTOR) argument is > that it is still somewhat exposed to non-interactive callers. For Emacs is not in the business of imposing The Right Way, instead we prefer to encourage it while still allowing people to shoot themselves in the foot in all kinds of fun ways. Stefan