unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38065: [PATCH] Add several configuration files to auto-mode-alist
@ 2019-11-05  3:04 Stefan Kangas
  2019-11-11 15:06 ` Stefan Kangas
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Kangas @ 2019-11-05  3:04 UTC (permalink / raw)
  To: 38065

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

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

[-- Attachment #2: 0001-Add-several-configuration-files-to-auto-mode-alist.patch --]
[-- Type: text/x-patch, Size: 2471 bytes --]

From c8d4b855a04432c8339e4aca039fd24b1c56428f Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#38065: [PATCH] Add several configuration files to auto-mode-alist
  2019-11-05  3:04 bug#38065: [PATCH] Add several configuration files to auto-mode-alist Stefan Kangas
@ 2019-11-11 15:06 ` Stefan Kangas
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Kangas @ 2019-11-11 15:06 UTC (permalink / raw)
  To: 38065

close 38065 27.1
thanks

Stefan Kangas <stefan@marxist.se> writes:

> 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?

No comments within 6 days.  Now pushed to master as commit e1602285b7.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-11 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05  3:04 bug#38065: [PATCH] Add several configuration files to auto-mode-alist Stefan Kangas
2019-11-11 15:06 ` Stefan Kangas

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).