comparison 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
comparison
equal deleted inserted replaced
368:397a7324211a 369:1d62742628b6
1157 ;; `default-auto-mode-alist') for default stuff, such as some of the 1157 ;; `default-auto-mode-alist') for default stuff, such as some of the
1158 ;; entries below. 1158 ;; entries below.
1159 1159
1160 (defvar auto-mode-alist 1160 (defvar auto-mode-alist
1161 '(("\\.te?xt\\'" . text-mode) 1161 '(("\\.te?xt\\'" . text-mode)
1162 ("\\.[ch]\\'" . c-mode) 1162 ("\\.[chi]\\'" . c-mode)
1163 ("\\.el\\'" . emacs-lisp-mode) 1163 ("\\.el\\'" . emacs-lisp-mode)
1164 ("\\.\\([CH]\\|cc\\|hh\\)\\'" . c++-mode) 1164 ("\\.\\(?:[CH]\\|cc\\|hh\\)\\'" . c++-mode)
1165 ("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode) 1165 ("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode)
1166 ("\\.java\\'" . java-mode) 1166 ("\\.java\\'" . java-mode)
1167 ("\\.idl\\'" . idl-mode) 1167 ("\\.idl\\'" . idl-mode)
1168 ("\\.f\\(or\\)?\\'" . fortran-mode) 1168 ("\\.f\\(?:or\\)?\\'" . fortran-mode)
1169 ("\\.F\\(OR\\)?\\'" . fortran-mode) 1169 ("\\.F\\(?:OR\\)?\\'" . fortran-mode)
1170 ("\\.[fF]90\\'" . f90-mode) 1170 ("\\.[fF]90\\'" . f90-mode)
1171 ;;; Less common extensions come here 1171 ;;; Less common extensions come here
1172 ;;; so more common ones above are found faster. 1172 ;;; so more common ones above are found faster.
1173 ("\\.\\([pP][Llm]\\|al\\)\\'" . perl-mode) 1173 ("\\.\\([pP][Llm]\\|al\\)\\'" . perl-mode)
1174 ("\\.py\\'" . python-mode) 1174 ("\\.py\\'" . python-mode)
1175 ("\\.texi\\(nfo\\)?\\'" . texinfo-mode) 1175 ("\\.texi\\(?:nfo\\)?\\'" . texinfo-mode)
1176 ("\\.ad[abs]\\'" . ada-mode) 1176 ("\\.ad[abs]\\'" . ada-mode)
1177 ("\\.c?l\\(i?sp\\)?\\'" . lisp-mode) 1177 ("\\.c?l\\(?:i?sp\\)?\\'" . lisp-mode)
1178 ("\\.p\\(as\\)?\\'" . pascal-mode) 1178 ("\\.p\\(?:as\\)?\\'" . pascal-mode)
1179 ("\\.ltx\\'" . latex-mode) 1179 ("\\.ltx\\'" . latex-mode)
1180 ("\\.[sS]\\'" . asm-mode) 1180 ("\\.[sS]\\'" . asm-mode)
1181 ("[Cc]hange.?[Ll]og?\\(.[0-9]+\\)?\\'" . change-log-mode) 1181 ("[Cc]hange.?[Ll]og?\\(?:.[0-9]+\\)?\\'" . change-log-mode)
1182 ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) 1182 ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode)
1183 ("\\.scm?\\(?:\\.[0-9]*\\)?\\'" . scheme-mode) 1183 ("\\.scm?\\(?:\\.[0-9]*\\)?\\'" . scheme-mode)
1184 ("\\.e\\'" . eiffel-mode) 1184 ("\\.e\\'" . eiffel-mode)
1185 ("\\.mss\\'" . scribe-mode) 1185 ("\\.mss\\'" . scribe-mode)
1186 ("\\.m\\([mes]\\|an\\)\\'" . nroff-mode) 1186 ("\\.m\\(?:[mes]\\|an\\)\\'" . nroff-mode)
1187 ("\\.icn\\'" . icon-mode) 1187 ("\\.icn\\'" . icon-mode)
1188 ("\\.\\([ckz]?sh\\|shar\\)\\'" . sh-mode) 1188 ("\\.\\(?:[ckz]?sh\\|shar\\)\\'" . sh-mode)
1189 ("\\.[Pp][Rr][Oo]\\'" . idlwave-mode)
1189 ;; #### Unix-specific! 1190 ;; #### Unix-specific!
1190 ("/\\.\\(bash_\\|z\\)?\\(profile\\|login\\|logout\\)\\'" . sh-mode) 1191 ("/\\.\\(?:bash_\\|z\\)?\\(profile\\|login\\|logout\\)\\'" . sh-mode)
1191 ("/\\.\\([ckz]sh\\|bash\\|tcsh\\|es\\|xinit\\|startx\\)rc\\'" . sh-mode) 1192 ("/\\.\\(?:[ckz]sh\\|bash\\|tcsh\\|es\\|xinit\\|startx\\)rc\\'" . sh-mode)
1192 ("/\\.\\([kz]shenv\\|xsession\\)\\'" . sh-mode) 1193 ("/\\.\\(?:[kz]shenv\\|xsession\\)\\'" . sh-mode)
1194 ("\\.m?spec$" .sh-mode)
1193 ;; The following come after the ChangeLog pattern for the sake of 1195 ;; The following come after the ChangeLog pattern for the sake of
1194 ;; ChangeLog.1, etc. and after the .scm.[0-9] pattern too. 1196 ;; ChangeLog.1, etc. and after the .scm.[0-9] pattern too.
1195 ("\\.[12345678]\\'" . nroff-mode) 1197 ("\\.[12345678]\\'" . nroff-mode)
1196 ("\\.[tT]e[xX]\\'" . tex-mode) 1198 ("\\.[tT]e[xX]\\'" . tex-mode)
1197 ("\\.\\(sty\\|cls\\|bbl\\)\\'" . latex-mode) 1199 ("\\.\\(?:sty\\|cls\\|bbl\\)\\'" . latex-mode)
1198 ("\\.bib\\'" . bibtex-mode) 1200 ("\\.bib\\'" . bibtex-mode)
1199 ("\\.article\\'" . text-mode) 1201 ("\\.article\\'" . text-mode)
1200 ("\\.letter\\'" . text-mode) 1202 ("\\.letter\\'" . text-mode)
1201 ("\\.\\(tcl\\|exp\\)\\'" . tcl-mode) 1203 ("\\.\\(?:tcl\\|exp\\)\\'" . tcl-mode)
1202 ("\\.wrl\\'" . vrml-mode) 1204 ("\\.wrl\\'" . vrml-mode)
1203 ("\\.awk\\'" . awk-mode) 1205 ("\\.awk\\'" . awk-mode)
1204 ("\\.prolog\\'" . prolog-mode) 1206 ("\\.prolog\\'" . prolog-mode)
1205 ("\\.tar\\'" . tar-mode) 1207 ("\\.tar\\'" . tar-mode)
1206 ("\\.\\(arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode) 1208 ("\\.\\(?:arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode)
1207 ;; Mailer puts message to be edited in /tmp/Re.... or Message 1209 ;; Mailer puts message to be edited in /tmp/Re.... or Message
1208 ;; #### Unix-specific! 1210 ;; #### Unix-specific!
1209 ("\\`/tmp/Re" . text-mode) 1211 ("\\`/tmp/Re" . text-mode)
1210 ("/Message[0-9]*\\'" . text-mode) 1212 ("/Message[0-9]*\\'" . text-mode)
1211 ("/drafts/[0-9]+\\'" . mh-letter-mode) 1213 ("/drafts/[0-9]+\\'" . mh-letter-mode)
1213 ("^/tmp/fol/" . text-mode) 1215 ("^/tmp/fol/" . text-mode)
1214 ("\\.y\\'" . c-mode) 1216 ("\\.y\\'" . c-mode)
1215 ("\\.lex\\'" . c-mode) 1217 ("\\.lex\\'" . c-mode)
1216 ("\\.m\\'" . objc-mode) 1218 ("\\.m\\'" . objc-mode)
1217 ("\\.oak\\'" . scheme-mode) 1219 ("\\.oak\\'" . scheme-mode)
1218 ("\\.s?html?\\'" . html-mode) 1220 ("\\.[sj]?html?\\'" . html-mode)
1219 ("\\.htm?l?3\\'" . html3-mode) 1221 ("\\.jsp\\'" . html-mode)
1220 ("\\.\\(sgml?\\|dtd\\)\\'" . sgml-mode) 1222 ("\\.xml\\'" . xml-mode)
1223 ("\\.\\(?:sgml?\\|dtd\\)\\'" . sgml-mode)
1221 ("\\.c?ps\\'" . postscript-mode) 1224 ("\\.c?ps\\'" . postscript-mode)
1222 ;; .emacs following a directory delimiter in either Unix or 1225 ;; .emacs following a directory delimiter in either Unix or
1223 ;; Windows syntax. 1226 ;; Windows syntax.
1224 ("[/\\][._].*emacs\\'" . emacs-lisp-mode) 1227 ("[/\\][._].*emacs\\'" . emacs-lisp-mode)
1225 ("\\.m4\\'" . autoconf-mode) 1228 ("\\.m4\\'" . autoconf-mode)
1226 ("configure\\.in\\'" . autoconf-mode) 1229 ("configure\\.in\\'" . autoconf-mode)
1227 ("\\.ml\\'" . lisp-mode) 1230 ("\\.ml\\'" . lisp-mode)
1228 ("\\.ma?k\\'" . makefile-mode) 1231 ("\\.ma?ke?\\'" . makefile-mode)
1229 ("[Mm]akefile\\(\\.\\|\\'\\)" . makefile-mode) 1232 ("[Mm]akefile\\(\\.\\|\\'\\)" . makefile-mode)
1230 ("\\.X\\(defaults\\|environment\\|resources\\|modmap\\)\\'" . xrdb-mode) 1233 ("\\.X\\(defaults\\|environment\\|resources\\|modmap\\)\\'" . xrdb-mode)
1231 ;; #### The following three are Unix-specific (but do we care?) 1234 ;; #### The following three are Unix-specific (but do we care?)
1232 ("/app-defaults/" . xrdb-mode) 1235 ("/app-defaults/" . xrdb-mode)
1233 ("\\.[^/]*wm\\'" . winmgr-mode) 1236 ("\\.[^/]*wm2?\\(?:rc\\)?\\'" . winmgr-mode)
1234 ("\\.[^/]*wm2?rc" . winmgr-mode)
1235 ("\\.[Jj][Pp][Ee]?[Gg]\\'" . image-mode) 1237 ("\\.[Jj][Pp][Ee]?[Gg]\\'" . image-mode)
1236 ("\\.[Pp][Nn][Gg]\\'" . image-mode) 1238 ("\\.[Pp][Nn][Gg]\\'" . image-mode)
1237 ("\\.[Gg][Ii][Ff]\\'" . image-mode) 1239 ("\\.[Gg][Ii][Ff]\\'" . image-mode)
1240 ("\\.[Tt][Ii][Ff][Ff]?\\'" . image-mode)
1238 ) 1241 )
1239 "Alist of filename patterns vs. corresponding major mode functions. 1242 "Alist of filename patterns vs. corresponding major mode functions.
1240 Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL). 1243 Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL).
1241 \(NON-NIL stands for anything that is not nil; the value does not matter.) 1244 \(NON-NIL stands for anything that is not nil; the value does not matter.)
1242 Visiting a file whose name matches REGEXP specifies FUNCTION as the 1245 Visiting a file whose name matches REGEXP specifies FUNCTION as the