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#67795: [PATCH] Handle local-variable major-mode remaps specifying non-existent mode Date: Tue, 12 Dec 2023 16:04:55 +0200 Message-ID: <83plzbtt2w.fsf@gnu.org> References: <87r0jrplx1.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34911"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67795@debbugs.gnu.org To: Brian Leung , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 12 15:06:19 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 1rD3Ot-0008re-8w for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Dec 2023 15:06:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rD3OP-0003Cz-7H; Tue, 12 Dec 2023 09:05:49 -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 1rD3ON-0003CH-8T for bug-gnu-emacs@gnu.org; Tue, 12 Dec 2023 09:05:47 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rD3OM-0004Fh-UU for bug-gnu-emacs@gnu.org; Tue, 12 Dec 2023 09:05:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rD3Ob-0005lv-SI for bug-gnu-emacs@gnu.org; Tue, 12 Dec 2023 09:06:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Dec 2023 14:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67795 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 67795-submit@debbugs.gnu.org id=B67795.170238996022180 (code B ref 67795); Tue, 12 Dec 2023 14:06:01 +0000 Original-Received: (at 67795) by debbugs.gnu.org; 12 Dec 2023 14:06:00 +0000 Original-Received: from localhost ([127.0.0.1]:55587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rD3Oa-0005lg-2L for submit@debbugs.gnu.org; Tue, 12 Dec 2023 09:06:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rD3OU-0005lM-Va for 67795@debbugs.gnu.org; Tue, 12 Dec 2023 09:05:58 -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 1rD3O8-0004AE-Dt; Tue, 12 Dec 2023 09:05:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=J3ZjhxCXvmSdWYtJ7cigzv8Kn8tJ2Hrcv4CE9tsBYxQ=; b=AcZgej+S98Pg Jxcbvuv52Mni1EzEQZE9Q1mcG4fQvBJEEAtp3364gTili78qfrikXRyFWCHM4BW3fUZ8+DExIATE1 d+4ENmPQxce3rIyDAzltJTgKyQSDR556NIM2Vajwwt9XQ3eQgP6q4a1Blp6arVWIAO2v8CBKqEAut x5lDaoxeETGypJ+IBSS7/2aTSbvBxchM1Uch3IsX5flaPqwGJ49PIqAnv5r3GqRiSb+TI6V0k8bZr /bYnq4PACUMrqNWmu975l8MBrAlXKCUi5BZOv1pFJ8hoqojPyNzlCuc0M6Ivt24cywpzxu+iX0yV0 xSsBotn3IpZVYwzDVsZmoA==; In-Reply-To: <87r0jrplx1.fsf@posteo.net> (message from Brian Leung on Tue, 12 Dec 2023 13:52:53 +0000) 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:276043 Archived-At: > From: Brian Leung > Date: Tue, 12 Dec 2023 13:52:53 +0000 > > >From 46435cac589506ecb131f480171a2ec1f0f03c55 Mon Sep 17 00:00:00 2001 > From: Brian Leung > Date: Tue, 12 Dec 2023 05:42:56 -0800 > Subject: [PATCH] Handle local-variable major-mode remaps specifying > non-existent mode > > In the .clang-format file of current Emacs HEAD, the major mode is > specified as yaml-mode via a local variable. However, a user who has > loaded yaml-ts-mode and executed > > (add-to-list 'major-mode-remap-alist '(yaml-mode . yaml-ts-mode) > > but does not have yaml-mode defined will find that opening the > .clang-format file does not use yaml-ts-mode. > > This patch fixes that. Thanks, but if we want to integrate major-mode-remap-alist better, I'd rather we did that in some lower-level place, so that we wouldn't need to sprinkle these alist-get calls all over Emacs. Also, if we do this, there will be no way for specifying a particular mode in file-local variables. Do we really want that? Stefan, WDYT?