From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: scratch/command 064f146 1/2: Change command to interactive ... modes Date: Wed, 17 Feb 2021 19:57:01 -0800 Message-ID: References: <20210213141225.11309.86562@vcs0.savannah.gnu.org> <20210213141226.EEDFE20999@vcs0.savannah.gnu.org> <47209379-76df-4c97-e5ff-b3b04da0db1d@yandex.ru> <87zh07of0e.fsf@gnus.org> <0605ed62-a785-d190-caf2-2232e1db3b0f@yandex.ru> <87mtw6d480.fsf@gnus.org> <87eehid3k2.fsf@gnus.org> <87r1liblzb.fsf@gnus.org> <87czwy1mu2.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33576"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 18 04:57:42 2021 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 1lCaRg-0008ZG-Oc for ged-emacs-devel@m.gmane-mx.org; Thu, 18 Feb 2021 04:57:40 +0100 Original-Received: from localhost ([::1]:41820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCaRf-0001Vt-MW for ged-emacs-devel@m.gmane-mx.org; Wed, 17 Feb 2021 22:57:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCaR7-00015t-6e for emacs-devel@gnu.org; Wed, 17 Feb 2021 22:57:05 -0500 Original-Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:39335) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lCaR5-0001kT-JV for emacs-devel@gnu.org; Wed, 17 Feb 2021 22:57:04 -0500 Original-Received: by mail-pl1-x62f.google.com with SMTP id k22so507893pll.6 for ; Wed, 17 Feb 2021 19:57:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=3PijDUTg00vOx3VEaIQ1jsKNFCckgWhG0Dovi16DOG0=; b=SO4H/3u/9AgEnxW1Q+vIaBGsTOBlQYlZK2daHb0Kp3k/MW8d9vHa8eZYSa28v+CkPj gjrjNvcgg0VV0va1QX1ls+dJcPkULNf9mg1lHiA1vkUBXjSwTLgWNorhS0OjhR9szs1l DPboJQB/bPYSL0HcYtOE+msco/e5ZJDxxudRsyY3Fs+SrQYFSNd1Vq3gUIWNT0fbwrBD 1ZmhYcSYVXlch6UQzub25p6zwxe3DAtK6SmKwnlmyMUE/nS8iqQoS1VOyCx/U3SqXzXa 79rHp0xUSRkMRyr4lBZAaqk+98xYC9sR0fosAacUMWrWV8JKGUmBSkO3hs4haTty57ep 3euA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=3PijDUTg00vOx3VEaIQ1jsKNFCckgWhG0Dovi16DOG0=; b=UTDT4RsuJtEp0VMB/vtvYZ0xtCXyphweav7SHyKBj7aI3k+kRDlXTxgI/Wn9qGWX9b hRxyq2eYJdjzz8JDCSgO01SKjzQRU0c4hkOUOZqNSq5LPBPC9+GBPuMcGTGq3V9cNLcf Gtl/9jUsmMZrrGKC+ow9qXDFxyS9pIyb/7D2vlitLPhvgdaAGAaj5t/F5EiY8v4EVFs0 guUG5DgVpSGg6jrfpBohWBXF8K1HXK4LKFSRse0u+cdSg8PkjDIDMTFWdf/aEZ/CNZmW XwBHqgoPeRYk1FJ0MaiVf6JRVDJnmV0IF/myB4+dwW+ti9uHNxrRifD1nhBpcpcwWXlL wpeg== X-Gm-Message-State: AOAM531kNevDpFdFBCH/uFiSPFbs3WrHJkdAimAKeCEKBsKizU4ELio0 RekqSlskh9YKeH364XV3eQ6dTBAU3TZxMO1YPf0= X-Google-Smtp-Source: ABdhPJy5mi3TluiAb2alPfs0TP/2VhHcWSnIhRXroz+3tDzKTPEgV/TVggJgcsHoF+80RTHKPWjcqxSQlPRVX7fEF/8= X-Received: by 2002:a17:90a:ea88:: with SMTP id h8mr2076852pjz.175.1613620622189; Wed, 17 Feb 2021 19:57:02 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 17 Feb 2021 19:57:01 -0800 In-Reply-To: <87czwy1mu2.fsf@gnus.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=stefankangas@gmail.com; helo=mail-pl1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:265121 Archived-At: Lars Ingebrigtsen writes: > Stefan Kangas writes: > >> Please find attached a patch. > > Hm... trying this out now, I don't think the compat macro solution > actually works. That is, it works fine when byte-compiled, but not in > non-compiled code. The reason for this is that `interactive-form' just > does a `Fassq' on the Lisp form and looks for the Qinteractive symbol. > Which is won't find if the symbol in `future-interactive'. It is working for me in Emacs 27, and it was working for me at the time when I wrote it (both byte-compiled and interpreted). I test by evaluating this in "emacs -Q": (defmacro future-interactive (arg-descriptor &rest modes) "Use the correct `interactive' form for any Emacs version. This is a forward compatibility macro that allows code providing the third argument to `interactive' (added in Emacs 28) to continue working on old versions of Emacs. To use it, replace `interactive' with `future-interactive'." (if (< emacs-major-version 28) `(interactive ,arg-descriptor) `(interactive ,arg-descriptor ,@modes))) (defun foo (arg) (future-interactive "P" fundamental-mode) (message "P was %s" arg)) And then I say `M-x foo RET'. If `footnote-mode' is activated, the macro did not work as expected, otherwise it did. Bisecting points to c1ef7adeb649aa as the first commit that broke it. Are you seeing the same thing?