Subject: bug#74946: [PATCH] * lisp/files.el (auto-mode-alist): Include gdbinit too

From: Björn Bidar <[email-masked]>
Date: Thu, 19 Dec 2024 23:29:00 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Stefan Kangas <[email-masked]>
>> Date: Wed, 18 Dec 2024 20:00:37 -0500
>> Cc: Eli Zaretskii <[email-masked]>, Andrea Corallo <[email-masked]>
>> 
>> > Please also include into Emacs 30 if possible.
>> 
>> If Eli and Andrea agrees, I think we could do it.
>
> It looks innocent enough, but at this point I'd like to limit changes
> on the release branch to only really urgent and important ones (or
> documentation).  We have lived with this outdated code for several
> years (GDB 11.1 was released in 2022), so this change doesn't look
> urgent to me.

Not really that urgent but to new users of Emacs it would be
beneficial if things would work out of the box. I thought at first Emacs
just didn't support the file.

> Btw, if we want to fix this entry, we should perhaps do a more
> thorough job.  For example, on my system I have files with the
> following base names:
>
>   .gdbinit.in
>   .gdbinit
>   _gdbinit (for MS-DOS)
>   gdb.ini (likewise)

Is this a gdbinit file? The extension looks off.

>   gdbinit
>   gdbinit.in
>   SOMETHING-gdbinit
>   .gdbinit.loader
>   gdbinit-history.exp (not a GDB init file)
>   gdbinit.5 (likewise)
>   gdbinit.c (likewise)
>   .gdbinit.py.in (likewise)
>
> Should we improve the regexp to DTRT for those additional files, but
> without false positives?

With Stefan correction all these without extension match. What are the
official extensions? gdbinit.in sounds like a normal extension for
gdbinit template in the source but the others such as gdb.ini look off.