From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Cassou Newsgroups: gmane.emacs.bugs Subject: bug#63345: 28.2; provided-mode-derived-p doesn't work when passed an alias in MODES Date: Sun, 07 May 2023 16:35:38 +0200 Message-ID: <87y1m0ryyt.fsf@cassou.me> References: <875y94tqry.fsf@cassou.me> <83o7mwe7md.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15290"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 63345@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 07 16:36:15 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 1pvfUl-0003pI-9d for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 May 2023 16:36:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pvfUZ-0004fg-LC; Sun, 07 May 2023 10:36:03 -0400 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 1pvfUY-0004fX-EX for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 10:36:02 -0400 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 1pvfUY-0001JU-6q for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 10:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pvfUY-0007O2-2V for bug-gnu-emacs@gnu.org; Sun, 07 May 2023 10:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Damien Cassou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 May 2023 14:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63345 X-GNU-PR-Package: emacs Original-Received: via spool by 63345-submit@debbugs.gnu.org id=B63345.168347014728353 (code B ref 63345); Sun, 07 May 2023 14:36:02 +0000 Original-Received: (at 63345) by debbugs.gnu.org; 7 May 2023 14:35:47 +0000 Original-Received: from localhost ([127.0.0.1]:38120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvfUJ-0007NC-AJ for submit@debbugs.gnu.org; Sun, 07 May 2023 10:35:47 -0400 Original-Received: from mail.choca.pics ([80.67.172.235]:36216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvfUG-0007N3-RZ for 63345@debbugs.gnu.org; Sun, 07 May 2023 10:35:45 -0400 Original-Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 4008C18032144; Sun, 7 May 2023 16:35:40 +0200 (CEST) Original-Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id bxvcA_VvOuSt; Sun, 7 May 2023 16:35:39 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 9B7571807FF4B; Sun, 7 May 2023 16:35:39 +0200 (CEST) X-Virus-Scanned: amavisd-new at choca.pics Original-Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id cIfrvlImnq6I; Sun, 7 May 2023 16:35:39 +0200 (CEST) Original-Received: from localhost (91.60.75.86.rev.sfr.net [86.75.60.91]) by mail.choca.pics (Postfix) with ESMTPSA id 09E3B18032144; Sun, 7 May 2023 16:35:38 +0200 (CEST) In-Reply-To: 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:261263 Archived-At: Stefan Monnier writes: > What was the original scenario where you bumped into this problem? The jinx package defines 'jinx-camel-modes [1], a list of major modes for languages using camel case or pascal case. This variable is passed to 'derived-mode-p. Before my PR #64 [2], this variable used to contain 'javascript-mode (the alias) instead of 'js-mode (the function). For a file using 'js-mode, the equivalent of the code below was executed: (derived-mode-p 'js-mode 'javascript-mode) =E2=87=92 nil I was expecting a non-nil value. My PR replaced 'javascript-mode with 'js-mode in 'jinx-camel-modes thus working around the problem. [1] https://github.com/minad/jinx/blob/0.8/jinx.el#L96 [2] https://github.com/minad/jinx/pull/64 --=20 Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill