comparison lisp/files.el @ 13662:cb0496b98829

(auto-mode-alist): Don't purecopy the alist elts.
author Richard M. Stallman <rms@gnu.org>
date Wed, 29 Nov 1995 21:18:05 +0000
parents 156eb7abebbd
children 40766c32c127
comparison
equal deleted inserted replaced
13661:d19b9d70b465 13662:cb0496b98829
878 enable-local-variables))) 878 enable-local-variables)))
879 (hack-local-variables)) 879 (hack-local-variables))
880 (error (message "File local-variables error: %s" 880 (error (message "File local-variables error: %s"
881 (prin1-to-string err))))) 881 (prin1-to-string err)))))
882 882
883 (defvar auto-mode-alist (mapcar 'purecopy 883 (defvar auto-mode-alist
884 '(("\\.text\\'" . text-mode) 884 '(("\\.text\\'" . text-mode)
885 ("\\.c\\'" . c-mode) 885 ("\\.c\\'" . c-mode)
886 ("\\.h\\'" . c-mode) 886 ("\\.h\\'" . c-mode)
887 ("\\.tex\\'" . tex-mode) 887 ("\\.tex\\'" . tex-mode)
888 ("\\.ltx\\'" . latex-mode) 888 ("\\.ltx\\'" . latex-mode)
889 ("\\.el\\'" . emacs-lisp-mode) 889 ("\\.el\\'" . emacs-lisp-mode)
890 ("\\.mm\\'" . nroff-mode) 890 ("\\.mm\\'" . nroff-mode)
891 ("\\.me\\'" . nroff-mode) 891 ("\\.me\\'" . nroff-mode)
892 ("\\.ms\\'" . nroff-mode) 892 ("\\.ms\\'" . nroff-mode)
893 ("\\.man\\'" . nroff-mode) 893 ("\\.man\\'" . nroff-mode)
894 ("\\.scm\\'" . scheme-mode) 894 ("\\.scm\\'" . scheme-mode)
895 ("\\.l\\'" . lisp-mode) 895 ("\\.l\\'" . lisp-mode)
896 ("\\.lisp\\'" . lisp-mode) 896 ("\\.lisp\\'" . lisp-mode)
897 ("\\.f\\'" . fortran-mode) 897 ("\\.f\\'" . fortran-mode)
898 ("\\.for\\'" . fortran-mode) 898 ("\\.for\\'" . fortran-mode)
899 ("\\.p\\'" . pascal-mode) 899 ("\\.p\\'" . pascal-mode)
900 ("\\.pas\\'" . pascal-mode) 900 ("\\.pas\\'" . pascal-mode)
901 ("\\.mss\\'" . scribe-mode) 901 ("\\.mss\\'" . scribe-mode)
902 ("\\.ad[abs]\\'" . ada-mode) 902 ("\\.ad[abs]\\'" . ada-mode)
903 ("\\.icn\\'" . icon-mode) 903 ("\\.icn\\'" . icon-mode)
904 ("\\.pl\\'" . perl-mode) 904 ("\\.pl\\'" . perl-mode)
905 ("\\.cc\\'" . c++-mode) 905 ("\\.cc\\'" . c++-mode)
906 ("\\.hh\\'" . c++-mode) 906 ("\\.hh\\'" . c++-mode)
907 ("\\.C\\'" . c++-mode) 907 ("\\.C\\'" . c++-mode)
908 ("\\.H\\'" . c++-mode) 908 ("\\.H\\'" . c++-mode)
909 ("\\.cpp\\'" . c++-mode) 909 ("\\.cpp\\'" . c++-mode)
910 ("\\.cxx\\'" . c++-mode) 910 ("\\.cxx\\'" . c++-mode)
911 ("\\.hxx\\'" . c++-mode) 911 ("\\.hxx\\'" . c++-mode)
912 ("\\.c\\+\\+\\'" . c++-mode) 912 ("\\.c\\+\\+\\'" . c++-mode)
913 ("\\.h\\+\\+\\'" . c++-mode) 913 ("\\.h\\+\\+\\'" . c++-mode)
914 ("\\.mk\\'" . makefile-mode) 914 ("\\.mk\\'" . makefile-mode)
915 ("[Mm]akefile\\(.in\\)?\\'" . makefile-mode) 915 ("[Mm]akefile\\(.in\\)?\\'" . makefile-mode)
916 ;;; Less common extensions come here 916 ;;; Less common extensions come here
917 ;;; so more common ones above are found faster. 917 ;;; so more common ones above are found faster.
918 ("\\.texinfo\\'" . texinfo-mode) 918 ("\\.texinfo\\'" . texinfo-mode)
919 ("\\.texi\\'" . texinfo-mode) 919 ("\\.texi\\'" . texinfo-mode)
920 ("\\.s\\'" . asm-mode) 920 ("\\.s\\'" . asm-mode)
921 ("ChangeLog\\'" . change-log-mode) 921 ("ChangeLog\\'" . change-log-mode)
922 ("change.log\\'" . change-log-mode) 922 ("change.log\\'" . change-log-mode)
923 ("changelo\\'" . change-log-mode) 923 ("changelo\\'" . change-log-mode)
924 ("ChangeLog.[0-9]+\\'" . change-log-mode) 924 ("ChangeLog.[0-9]+\\'" . change-log-mode)
925 ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) 925 ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode)
926 ("\\.scm\\.[0-9]*\\'" . scheme-mode) 926 ("\\.scm\\.[0-9]*\\'" . scheme-mode)
927 ;;; The following should come after the ChangeLog pattern 927 ;;; The following should come after the ChangeLog pattern
928 ;;; for the sake of ChangeLog.1, etc. 928 ;;; for the sake of ChangeLog.1, etc.
929 ;;; and after the .scm.[0-9] pattern too. 929 ;;; and after the .scm.[0-9] pattern too.
930 ("\\.[12345678]\\'" . nroff-mode) 930 ("\\.[12345678]\\'" . nroff-mode)
931 ("\\.TeX\\'" . tex-mode) 931 ("\\.TeX\\'" . tex-mode)
932 ("\\.sty\\'" . latex-mode) 932 ("\\.sty\\'" . latex-mode)
933 ("\\.cls\\'" . latex-mode) ;LaTeX 2e class 933 ("\\.cls\\'" . latex-mode) ;LaTeX 2e class
934 ("\\.bbl\\'" . latex-mode) 934 ("\\.bbl\\'" . latex-mode)
935 ("\\.bib\\'" . bibtex-mode) 935 ("\\.bib\\'" . bibtex-mode)
936 ("\\.article\\'" . text-mode) 936 ("\\.article\\'" . text-mode)
937 ("\\.letter\\'" . text-mode) 937 ("\\.letter\\'" . text-mode)
938 ("\\.tcl\\'" . tcl-mode) 938 ("\\.tcl\\'" . tcl-mode)
939 ("\\.f90\\'" . f90-mode) 939 ("\\.f90\\'" . f90-mode)
940 ("\\.lsp\\'" . lisp-mode) 940 ("\\.lsp\\'" . lisp-mode)
941 ("\\.awk\\'" . awk-mode) 941 ("\\.awk\\'" . awk-mode)
942 ("\\.prolog\\'" . prolog-mode) 942 ("\\.prolog\\'" . prolog-mode)
943 ("\\.tar\\'" . tar-mode) 943 ("\\.tar\\'" . tar-mode)
944 ("\\.\\(arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode) 944 ("\\.\\(arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode)
945 ;; Mailer puts message to be edited in 945 ;; Mailer puts message to be edited in
946 ;; /tmp/Re.... or Message 946 ;; /tmp/Re.... or Message
947 ("^/tmp/Re" . text-mode) 947 ("^/tmp/Re" . text-mode)
948 ("/Message[0-9]*\\'" . text-mode) 948 ("/Message[0-9]*\\'" . text-mode)
949 ("/drafts/[0-9]+\\'" . mh-letter-mode) 949 ("/drafts/[0-9]+\\'" . mh-letter-mode)
950 ;; some news reader is reported to use this 950 ;; some news reader is reported to use this
951 ("^/tmp/fol/" . text-mode) 951 ("^/tmp/fol/" . text-mode)
952 ("\\.y\\'" . c-mode) 952 ("\\.y\\'" . c-mode)
953 ("\\.lex\\'" . c-mode) 953 ("\\.lex\\'" . c-mode)
954 ("\\.oak\\'" . scheme-mode) 954 ("\\.oak\\'" . scheme-mode)
955 ("\\.sgm\\'" . sgml-mode) 955 ("\\.sgm\\'" . sgml-mode)
956 ("\\.sgml\\'" . sgml-mode) 956 ("\\.sgml\\'" . sgml-mode)
957 ("\\.dtd\\'" . sgml-mode) 957 ("\\.dtd\\'" . sgml-mode)
958 ;; .emacs following a directory delimiter 958 ;; .emacs following a directory delimiter
959 ;; in either Unix or VMS syntax. 959 ;; in either Unix or VMS syntax.
960 ("[]>:/]\\..*emacs\\'" . emacs-lisp-mode) 960 ("[]>:/]\\..*emacs\\'" . emacs-lisp-mode)
961 ;; _emacs following a directory delimiter 961 ;; _emacs following a directory delimiter
962 ;; in MsDos syntax 962 ;; in MsDos syntax
963 ("[:/]_emacs\\'" . emacs-lisp-mode) 963 ("[:/]_emacs\\'" . emacs-lisp-mode)
964 ("\\.ml\\'" . lisp-mode))) 964 ("\\.ml\\'" . lisp-mode))
965 "\ 965 "\
966 Alist of filename patterns vs corresponding major mode functions. 966 Alist of filename patterns vs corresponding major mode functions.
967 Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL). 967 Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL).
968 \(NON-NIL stands for anything that is not nil; the value does not matter.) 968 \(NON-NIL stands for anything that is not nil; the value does not matter.)
969 Visiting a file whose name matches REGEXP specifies FUNCTION as the 969 Visiting a file whose name matches REGEXP specifies FUNCTION as the