From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Reuben Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#46331: provided-mode-derived-p doesn't work on aliases Date: Fri, 5 Feb 2021 17:13:06 +0000 Message-ID: Reply-To: Reuben Thomas Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d0be4505ba99ef44" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33417"; mail-complaints-to="usenet@ciao.gmane.io" To: 46331@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 05 18:57:58 2021 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 1l85Mj-0008Uh-6V for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Feb 2021 18:57:57 +0100 Original-Received: from localhost ([::1]:47078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l85Mi-0004rT-59 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Feb 2021 12:57:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l84gF-0006ce-5P for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2021 12:14:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33083) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l84gE-0001Uh-0J for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2021 12:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l84gD-0007aE-RA for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2021 12:14:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Feb 2021 17:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46331 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.161254521129102 (code B ref -1); Fri, 05 Feb 2021 17:14:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Feb 2021 17:13:31 +0000 Original-Received: from localhost ([127.0.0.1]:44629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l84fj-0007ZK-D1 for submit@debbugs.gnu.org; Fri, 05 Feb 2021 12:13:31 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:32898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l84fh-0007ZC-UF for submit@debbugs.gnu.org; Fri, 05 Feb 2021 12:13:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l84fh-0005gS-MT for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2021 12:13:29 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48387) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l84fh-0001Gc-9g for bug-gnu-emacs@gnu.org; Fri, 05 Feb 2021 12:13:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57066) by fencepost.gnu.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l84fe-0006U4-Q9 for bug-emacs@gnu.org; Fri, 05 Feb 2021 12:13:27 -0500 Original-Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]:44539) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l84fa-0001Cn-EM for bug-emacs@gnu.org; Fri, 05 Feb 2021 12:13:26 -0500 Original-Received: by mail-oi1-x229.google.com with SMTP id n7so8169166oic.11 for ; Fri, 05 Feb 2021 09:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:from:date:message-id:subject:to; bh=6wqDePZAEtTRSwb2cnMJLzc9V9AajjiJO99hY62GqGc=; b=BplSY1kOm1IQA6SUbXa7g8tZvD4ccqWuAzPbrnAxV3Bkkl9ntNeIl8HE7BrJZaSGZS ydqk7hqsD2TssdaFd1uy/QSdhgUGWVrOCYETqjhpm7B3w6m2gvCZJiyeHnQSgLN4t7U0 XCoWkqVQngT3vj12nyVfpk2f9zctO17f/+znA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=6wqDePZAEtTRSwb2cnMJLzc9V9AajjiJO99hY62GqGc=; b=GlrEZFa70vGeWH3E0EWlvZ5DCk1ItntjCzmp3hPtiqoOMJ3nOPBjhhJLbVJM6TdYI0 fS+Xf7n10exH5TqLqaDEw9ikyJrZMqfSV3xLBjBSXmvkWJSBILPQGXhugj1DXaZJo9E0 fcTUQRoXvLXyz2OG4ZSdRBE2+6XIRNZgGYjohh/0xxqX1shRQDeu79q3+wyjQ1u2ZTTe 6H7arIHr3Kgmf1EZBo973Nuro2CaYdLBSpjD7UwbdBVrgBxXLmpW/6SB/YPI84mNIPZu wBERKTBukeNF1KmsjtYCHcgUKGppHcUipCKyh3hAx47WuY9blAJtrVuxmzi3e7ZY39aJ gOpA== X-Gm-Message-State: AOAM532NA82BpubnC+yoMIEQX5bMAUxPhnZn+jQq8rlhH2meMSzy9gtm +sdhGfjcSCV0KzserUAN2bwBlZ2rpnRwJJ1wVOXsmAxxCHFTAQ== X-Google-Smtp-Source: ABdhPJyMSi6W2wZaL2t4rbhnKbyTK5lchBXp1SSqWaE3Dy+E9o6GL9FLsrfXUwtDgaJKpqMqt6iUiqEBf4QTY/uOFgU= X-Received: by 2002:aca:1e15:: with SMTP id m21mr3499414oic.62.1612545199744; Fri, 05 Feb 2021 09:13:19 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::229; envelope-from=rrt@sc3d.org; helo=mail-oi1-x229.google.com X-Spam_score_int: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 5.0 requ) BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_SBL_A=0.1 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:199396 Archived-At: --000000000000d0be4505ba99ef44 Content-Type: text/plain; charset="UTF-8" javascript-mode is an alias for js-mode, and some third-party modes (e.g. json-mode) derive from it. (provided-mode-derived-p 'js-mode 'prog-mode) == t but (provided-mode-derived-p 'javascript-mode 'prog-mode) == nil Hence in json-mode, (derived-mode-p 'prog-mode) evaluates to nil, which seems unfortunate. -- https://rrt.sc3d.org --000000000000d0be4505ba99ef44 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
javascript-mode is an alias for js-mode= , and some third-party modes (e.g. json-mode) derive from it.

(provided-mode-= derived-p 'js-mode 'prog-mode) =3D=3D t

but

(provided-mode-derived-p 'javascr= ipt-mode 'prog-mode) =3D=3D nil

Hence in json-mode, (derived-mode-p 'prog-mode) evaluates to nil, = which seems unfortunate.

--
--000000000000d0be4505ba99ef44--