From: Chong Yidong Date: Sat, 28 May 2011 19:26:25 +0000 (-0400) Subject: Tweak auto-mode-alist to handle config.h.in (Bug#8547). X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~116 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5d344e883f9e599a1580009a55bcf09230e1da02;p=emacs.git Tweak auto-mode-alist to handle config.h.in (Bug#8547). * lisp/files.el (auto-mode-alist): Move config rule after the in-stripping one. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 29fb623cba8..a27a784f0ec 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-05-28 Chong Yidong + + * files.el (auto-mode-alist): Move config rule after the + in-stripping one (Bug#8547). + 2011-05-28 Alp Aker (tiny change) * buff-menu.el (Buffer-menu-revert-function, Buffer-menu-sort): diff --git a/lisp/files.el b/lisp/files.el index 6d3d5006448..cc1ad23925d 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2437,8 +2437,6 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode) ("\\.ppd\\'" . conf-ppd-mode) ("java.+\\.conf\\'" . conf-javaprop-mode) ("\\.properties\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-javaprop-mode) - ;; *.cf, *.cfg, *.conf, *.config[.local|.de_DE.UTF8|...], */config - ("[/.]c\\(?:on\\)?f\\(?:i?g\\)?\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-mode-maybe) ("\\`/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; @@ -2460,11 +2458,14 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode) ;; Using mode nil rather than `ignore' would let the search continue ;; through this list (with the shortened name) rather than start over. ("\\.~?[0-9]+\\.[0-9][-.0-9]*~?\\'" nil t) + ("\\.\\(?:orig\\|in\\|[bB][aA][kK]\\)\\'" nil t) + ;; This should come after "in" stripping (e.g. config.h.in). + ;; *.cf, *.cfg, *.conf, *.config[.local|.de_DE.UTF8|...], */config + ("[/.]c\\(?:on\\)?f\\(?:i?g\\)?\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-mode-maybe) ;; The following should come after the ChangeLog pattern ;; for the sake of ChangeLog.1, etc. ;; and after the .scm.[0-9] and CVS' . patterns too. - ("\\.[1-9]\\'" . nroff-mode) - ("\\.\\(?:orig\\|in\\|[bB][aA][kK]\\)\\'" nil t))) + ("\\.[1-9]\\'" . nroff-mode))) "Alist of filename patterns vs corresponding major mode functions. Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL). \(NON-NIL stands for anything that is not nil; the value does not matter.)