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.bugs Subject: bug#60645: 30.0.50; interactive MODES not detected properly Date: Sun, 08 Jan 2023 14:11:08 +0200 Message-ID: <83wn5xp6oz.fsf@gnu.org> References: <83fsclqtdt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30873"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60645@debbugs.gnu.org To: Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 08 13:11:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pEUWB-0007pA-My for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Jan 2023 13:11:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEUW0-0002iK-UL; Sun, 08 Jan 2023 07:11:04 -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 1pEUVz-0002gX-0w for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2023 07:11:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEUVy-0005HE-KC for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2023 07:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pEUVy-0006Tb-6D for bug-gnu-emacs@gnu.org; Sun, 08 Jan 2023 07:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Jan 2023 12:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60645 X-GNU-PR-Package: emacs Original-Received: via spool by 60645-submit@debbugs.gnu.org id=B60645.167317985224875 (code B ref 60645); Sun, 08 Jan 2023 12:11:02 +0000 Original-Received: (at 60645) by debbugs.gnu.org; 8 Jan 2023 12:10:52 +0000 Original-Received: from localhost ([127.0.0.1]:60108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEUVn-0006T9-HJ for submit@debbugs.gnu.org; Sun, 08 Jan 2023 07:10:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEUVm-0006Sv-8q for 60645@debbugs.gnu.org; Sun, 08 Jan 2023 07:10:50 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEUVg-0005D2-UL; Sun, 08 Jan 2023 07:10:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=9bvD0eX10uOo2+i9e0hgO1fGSvUtGA+AfJXpiCefEf0=; b=nFq+8uJ5UBm3dKv7S08j NQ1EQv/7iuThqLNFUdDo20Gnr1BUK3vFZFG7Cr8mnKXLAqqhrSbo30Ewi5+aXaRVjfSSFyIT6AORY R1to3eYljxGzWyfmdSbqQCWVugjGPoLKpJEMLeGeOETUTsMtvxbBbaZe14Ews0efP3HH4gmg5VQv1 Le8v1MZdXYqW3y7+ewL9bdlDgjq22hGiv2M9K7D+3PK9nQEQlWg5RFIwmM674mK/xicssRpcfEHsp BX6x2s59ijjfYBp9scxAnzBYTuph+wpFj/6kU6sHFwESOC5PSiQIgXP9VhceKcQyYJrJDG81LMSXD ifaLBybTrkDOOQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEUVg-0004IU-FT; Sun, 08 Jan 2023 07:10:44 -0500 In-Reply-To: (message from Jean Louis on Sun, 8 Jan 2023 14:26:18 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252918 Archived-At: > Date: Sun, 8 Jan 2023 14:26:18 +0300 > From: Jean Louis > Cc: 60645@debbugs.gnu.org > > * Eli Zaretskii [2023-01-08 12:15]: > > Maybe one of the inconsistencies is your expectations. What did you > > expect to happen in each case, and why? > > For this function: > > (defun my-function () > (interactive nil '(text-mode mail-mode)) > (message "Hello")) > > > If MODES is present, it should be a list of mode names (symbols) that > > this command is applicable for. The main effect of this is that > > ‘M-x TAB’ (by default) won’t list this command if the current buffer’s > > mode doesn’t match the list. That is, if either the major mode isn’t > > derived from them, or (when it’s a minor mode) the mode isn’t in effect. > > I expect that M-x TAB shows it in this mail-mode, but it does not show > it this time. That is one of expectations, among several. > > In general, I would like to setup functions NOT to show in modes where > they should not be shown. > > I feel this function does not work. > > If you have working example, show me. The interactive form is wrong. It should be this: (defun my-function () (interactive nil text-mode mail-mode) (message "Hello")) IOW, no quoting and no explicit list. The documentation clearly says (interactive &optional ARG-DESCRIPTOR &rest MODES) "&rest MODES" means zero or more symbols, not a quoted list.