diff lisp/files.el @ 369:1d62742628b6 r21-1-14

Import from CVS: tag r21-1-14
author cvs
date Mon, 13 Aug 2007 11:01:51 +0200
parents 30d2cfa1092a
children cc15677e0335
line wrap: on
line diff
--- a/lisp/files.el	Mon Aug 13 11:01:11 2007 +0200
+++ b/lisp/files.el	Mon Aug 13 11:01:51 2007 +0200
@@ -1159,51 +1159,53 @@
 
 (defvar auto-mode-alist
   '(("\\.te?xt\\'" . text-mode)
-    ("\\.[ch]\\'" . c-mode)
+    ("\\.[chi]\\'" . c-mode)
     ("\\.el\\'" . emacs-lisp-mode)
-    ("\\.\\([CH]\\|cc\\|hh\\)\\'" . c++-mode)
+    ("\\.\\(?:[CH]\\|cc\\|hh\\)\\'" . c++-mode)
     ("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode)
     ("\\.java\\'" . java-mode)
     ("\\.idl\\'" . idl-mode)
-    ("\\.f\\(or\\)?\\'" . fortran-mode)
-    ("\\.F\\(OR\\)?\\'" . fortran-mode)
+    ("\\.f\\(?:or\\)?\\'" . fortran-mode)
+    ("\\.F\\(?:OR\\)?\\'" . fortran-mode)
     ("\\.[fF]90\\'" . f90-mode)
 ;;; Less common extensions come here
 ;;; so more common ones above are found faster.
     ("\\.\\([pP][Llm]\\|al\\)\\'" . perl-mode)
     ("\\.py\\'" . python-mode)
-    ("\\.texi\\(nfo\\)?\\'" . texinfo-mode)
+    ("\\.texi\\(?:nfo\\)?\\'" . texinfo-mode)
     ("\\.ad[abs]\\'" . ada-mode)
-    ("\\.c?l\\(i?sp\\)?\\'" . lisp-mode)
-    ("\\.p\\(as\\)?\\'" . pascal-mode)
+    ("\\.c?l\\(?:i?sp\\)?\\'" . lisp-mode)
+    ("\\.p\\(?:as\\)?\\'" . pascal-mode)
     ("\\.ltx\\'" . latex-mode)
     ("\\.[sS]\\'" . asm-mode)
-    ("[Cc]hange.?[Ll]og?\\(.[0-9]+\\)?\\'" . change-log-mode)
+    ("[Cc]hange.?[Ll]og?\\(?:.[0-9]+\\)?\\'" . change-log-mode)
     ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode)
     ("\\.scm?\\(?:\\.[0-9]*\\)?\\'" . scheme-mode)
     ("\\.e\\'" . eiffel-mode)
     ("\\.mss\\'" . scribe-mode)
-    ("\\.m\\([mes]\\|an\\)\\'" . nroff-mode)
+    ("\\.m\\(?:[mes]\\|an\\)\\'" . nroff-mode)
     ("\\.icn\\'" . icon-mode)
-    ("\\.\\([ckz]?sh\\|shar\\)\\'" . sh-mode)
+    ("\\.\\(?:[ckz]?sh\\|shar\\)\\'" . sh-mode)
+    ("\\.[Pp][Rr][Oo]\\'" . idlwave-mode)
     ;; #### Unix-specific!
-    ("/\\.\\(bash_\\|z\\)?\\(profile\\|login\\|logout\\)\\'" . sh-mode)
-    ("/\\.\\([ckz]sh\\|bash\\|tcsh\\|es\\|xinit\\|startx\\)rc\\'" . sh-mode)
-    ("/\\.\\([kz]shenv\\|xsession\\)\\'" . sh-mode)
+    ("/\\.\\(?:bash_\\|z\\)?\\(profile\\|login\\|logout\\)\\'" . sh-mode)
+    ("/\\.\\(?:[ckz]sh\\|bash\\|tcsh\\|es\\|xinit\\|startx\\)rc\\'" . sh-mode)
+    ("/\\.\\(?:[kz]shenv\\|xsession\\)\\'" . sh-mode)
+    ("\\.m?spec$" .sh-mode)
     ;; The following come after the ChangeLog pattern for the sake of
     ;; ChangeLog.1, etc. and after the .scm.[0-9] pattern too.
     ("\\.[12345678]\\'" . nroff-mode)
     ("\\.[tT]e[xX]\\'" . tex-mode)
-    ("\\.\\(sty\\|cls\\|bbl\\)\\'" . latex-mode)
+    ("\\.\\(?:sty\\|cls\\|bbl\\)\\'" . latex-mode)
     ("\\.bib\\'" . bibtex-mode)
     ("\\.article\\'" . text-mode)
     ("\\.letter\\'" . text-mode)
-    ("\\.\\(tcl\\|exp\\)\\'" . tcl-mode)
+    ("\\.\\(?:tcl\\|exp\\)\\'" . tcl-mode)
     ("\\.wrl\\'" . vrml-mode)
     ("\\.awk\\'" . awk-mode)
     ("\\.prolog\\'" . prolog-mode)
     ("\\.tar\\'" . tar-mode)
-    ("\\.\\(arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode)
+    ("\\.\\(?:arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode)
     ;; Mailer puts message to be edited in /tmp/Re.... or Message
     ;; #### Unix-specific!
     ("\\`/tmp/Re" . text-mode)
@@ -1215,9 +1217,10 @@
     ("\\.lex\\'" . c-mode)
     ("\\.m\\'" . objc-mode)
     ("\\.oak\\'" . scheme-mode)
-    ("\\.s?html?\\'" . html-mode)
-    ("\\.htm?l?3\\'" . html3-mode)
-    ("\\.\\(sgml?\\|dtd\\)\\'" . sgml-mode)
+    ("\\.[sj]?html?\\'" . html-mode)
+    ("\\.jsp\\'" . html-mode)
+    ("\\.xml\\'" . xml-mode)
+    ("\\.\\(?:sgml?\\|dtd\\)\\'" . sgml-mode)
     ("\\.c?ps\\'" . postscript-mode)
     ;; .emacs following a directory delimiter in either Unix or
     ;; Windows syntax.
@@ -1225,16 +1228,16 @@
     ("\\.m4\\'" . autoconf-mode)
     ("configure\\.in\\'" . autoconf-mode)
     ("\\.ml\\'" . lisp-mode)
-    ("\\.ma?k\\'" . makefile-mode)
+    ("\\.ma?ke?\\'" . makefile-mode)
     ("[Mm]akefile\\(\\.\\|\\'\\)" . makefile-mode)
     ("\\.X\\(defaults\\|environment\\|resources\\|modmap\\)\\'" . xrdb-mode)
     ;; #### The following three are Unix-specific (but do we care?)
     ("/app-defaults/" . xrdb-mode)
-    ("\\.[^/]*wm\\'" . winmgr-mode)
-    ("\\.[^/]*wm2?rc" . winmgr-mode)
+    ("\\.[^/]*wm2?\\(?:rc\\)?\\'" . winmgr-mode)
     ("\\.[Jj][Pp][Ee]?[Gg]\\'" . image-mode)
     ("\\.[Pp][Nn][Gg]\\'" . image-mode)
     ("\\.[Gg][Ii][Ff]\\'" . image-mode)
+    ("\\.[Tt][Ii][Ff][Ff]?\\'" . image-mode)
     )
 "Alist of filename patterns vs. corresponding major mode functions.
 Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL).