GNU bug report logs - #36401
26.0.90; set-auto-mode uses case-insensitive match for magic-mode-alist

Previous Next

Package: emacs;

Reported by: Benjamin Riefenstahl <Riefenstahl <at> mecom.de>

Date: Thu, 27 Jun 2019 10:14:02 UTC

Severity: minor

Found in version 26.0.90

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 36401 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Benjamin Riefenstahl <Riefenstahl <at> mecom.de>
Cc: 36401 <at> debbugs.gnu.org
Subject: Re: bug#36401: 26.0.90;
 set-auto-mode uses case-insensitive match for magic-mode-alist
Date: Sat, 06 Jul 2019 11:36:21 +0300
> From: Benjamin Riefenstahl <Riefenstahl <at> mecom.de>
> Date: Thu, 27 Jun 2019 11:30:47 +0200
> 
> It turns out that "set-auto-mode" in lisp/files.el is the function that
> uses magic-mode-alist, and it just calls "looking-at" to test the type.
> Because "case-fold-search" is "t" by default, this catches files
> starting with "mtff".
> 
> Is this intentional?  If so, the documentation for "magic-mode-alist"
> should call this out, so users know they might need to work around it.
> If not, I could propose a patch to fix it.

I think this is an omission.  Please do propose a patch to fix it.

Thanks.




This bug report was last modified 5 years and 306 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.