Subject: [PATCH] Add several configuration files to auto-mode-alist

From: Stefan Kangas <[email-masked]>
Date: Tue, 5 Nov 2019 04:04:09 +0100

This patch just adds a bunch of common configuration files to
auto-mode-alist.  I wasn't sure why some of these entries were missing
(e.g. .screenrc) so I thought it prudent to ask before pushing if
there is any reason why we're trying to keep this alist short?

OTOH, I did see that the configuration files for tux racer is in
there... which is fine by me and I suppose pretty useful for those
that have a need to edit that file on a regular basis. ;-)

(FWIW, I imagine there's a good amount of commonly used configuration
files that could usefully be added to this list.  This is just (some
of the) files I found in my $HOME and where having something other
than fundamental-mode would be nice.)

Best regards,
Stefan Kangas
From c8d4b855a04432c8339e4aca039fd24b1c56428f Mon Sep 17 00:00:00 2001
From: Stefan Kangas <[email-masked]>
Date: Tue, 5 Nov 2019 03:42:48 +0100
Subject: [PATCH] Add several configuration files to auto-mode-alist

* lisp/files.el (auto-mode-alist): Use conf-mode for .asoundrc,
.mairixrc, .mbsyncr, .msmtprc, .nvidia-settings-rc, .offlineimaprc,
.reportbugrc, .rtorrent.rc, .screenrc, .mpdconf, .notmuch-config.  Use
conf-windows-mode for .redshift.conf.
---
 lisp/files.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/files.el b/lisp/files.el
index 7690357058..513977ea6b 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2819,6 +2819,7 @@ auto-mode-alist
      ("\\.properties\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-javaprop-mode)
      ("\\.toml\\'" . conf-toml-mode)
      ("\\.desktop\\'" . conf-desktop-mode)
+     ("\\.redshift.conf\\'" . conf-windows-mode)
      ("\\`/etc/\\(?:DIR_COLORS\\|ethers\\|.?fstab\\|.*hosts\\|lesskey\\|login\\.?de\\(?:fs\\|vperm\\)\\|magic\\|mtab\\|pam\\.d/.*\\|permissions\\(?:\\.d/.+\\)?\\|protocols\\|rpc\\|services\\)\\'" . conf-space-mode)
      ("\\`/etc/\\(?:acpid?/.+\\|aliases\\(?:\\.d/.+\\)?\\|default/.+\\|group-?\\|hosts\\..+\\|inittab\\|ksysguarddrc\\|opera6rc\\|passwd-?\\|shadow-?\\|sysconfig/.+\\)\\'" . conf-mode)
      ;; ChangeLog.old etc.  Other change-log-mode entries are above;
@@ -2827,8 +2828,8 @@ auto-mode-alist
      ;; either user's dot-files or under /etc or some such
      ("/\\.?\\(?:gitconfig\\|gnokiirc\\|hgrc\\|kde.*rc\\|mime\\.types\\|wgetrc\\)\\'" . conf-mode)
      ;; alas not all ~/.*rc files are like this
-     ("/\\.\\(?:enigma\\|gltron\\|gtk\\|hxplayer\\|net\\|neverball\\|qt/.+\\|realplayer\\|scummvm\\|sversion\\|sylpheed/.+\\|xmp\\)rc\\'" . conf-mode)
-     ("/\\.\\(?:gdbtkinit\\|grip\\|orbital/.+txt\\|rhosts\\|tuxracer/options\\)\\'" . conf-mode)
+     ("/\\.\\(?:asound\\|enigma\\|fetchmail\\|gltron\\|gtk\\|hxplayer\\|mairix\\|mbsync\\|msmtp\\|net\\|neverball\\|nvidia-settings-\\|offlineimap\\|qt/.+\\|realplayer\\|reportbug\\|rtorrent\\.\\|screen\\|scummvm\\|sversion\\|sylpheed/.+\\|xmp\\)rc\\'" . conf-mode)
+     ("/\\.\\(?:gdbtkinit\\|grip\\|mpdconf\\|notmuch-config\\|orbital/.+txt\\|rhosts\\|tuxracer/options\\)\\'" . conf-mode)
      ("/\\.?X\\(?:default\\|resource\\|re\\)s\\>" . conf-xdefaults-mode)
      ("/X11.+app-defaults/\\|\\.ad\\'" . conf-xdefaults-mode)
      ("/X11.+locale/.+/Compose\\'" . conf-colon-mode)
-- 
2.20.1