unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Brian Leung <leungbk@posteo.net>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 67795@debbugs.gnu.org
Subject: bug#67795: [PATCH] Handle local-variable major-mode remaps specifying non-existent mode
Date: Tue, 12 Dec 2023 16:04:55 +0200	[thread overview]
Message-ID: <83plzbtt2w.fsf@gnu.org> (raw)
In-Reply-To: <87r0jrplx1.fsf@posteo.net> (message from Brian Leung on Tue, 12 Dec 2023 13:52:53 +0000)

> From: Brian Leung <leungbk@posteo.net>
> Date: Tue, 12 Dec 2023 13:52:53 +0000
> 
> >From 46435cac589506ecb131f480171a2ec1f0f03c55 Mon Sep 17 00:00:00 2001
> From: Brian Leung <leungbk@posteo.net>
> 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?





  reply	other threads:[~2023-12-12 14:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12 13:52 bug#67795: [PATCH] Handle local-variable major-mode remaps specifying non-existent mode Brian Leung
2023-12-12 14:04 ` Eli Zaretskii [this message]
2023-12-12 16:02   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-12 17:17     ` Eli Zaretskii
2024-03-05  6:28 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-05  7:01 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-15  2:17   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83plzbtt2w.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=67795@debbugs.gnu.org \
    --cc=leungbk@posteo.net \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).