From 1ba2ce9320513efa0fb4b2d6a5022bb9d635af68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= Date: Wed, 18 Dec 2024 16:07:34 +0200 Subject: [PATCH] * lisp/files.el (auto-mode-alist): Include gdbinit too Since gdb 11.1 .gdbinit can be also called gdbinit saved inside $XDG_CONFIG_HOME or $HOME/Library/Preferences/gdb on Apple Hosts. https://lists.gnu.org/archive/html/info-gnu/2021-09/msg00007.html --- lisp/files.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 9f13804540b..6fe037f30e7 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3001,11 +3001,12 @@ auto-mode-alist ("\\.css\\'" . css-mode) ("\\.mixal\\'" . mixal-mode) ("\\.gcov\\'" . compilation-mode) - ;; Besides .gdbinit, gdb documents other names to be usable for init + ;; gdbinit can be gdbinit or .gdbinit the exact prefix does not matter. + ;; Besides gdbinit, gdb documents other names to be usable for init ;; files, cross-debuggers can use something like ;; .PROCESSORNAME-gdbinit so that the host and target gdbinit files ;; don't interfere with each other. - ("/\\.[a-z0-9-]*gdbinit" . gdb-script-mode) + ("/[.a-z0-9-]*gdbinit" . gdb-script-mode) ;; GDB 7.5 introduced OBJFILE-gdb.gdb script files; e.g. a file ;; named 'emacs-gdb.gdb', if it exists, will be automatically ;; loaded when GDB reads an objfile called 'emacs'. -- 2.47.1