diff options
| author | Daniel Pfeiffer | 2004-11-10 00:39:54 +0000 |
|---|---|---|
| committer | Daniel Pfeiffer | 2004-11-10 00:39:54 +0000 |
| commit | 80174d35b9e39d37b5e1ebf5b8a10d012986ba9f (patch) | |
| tree | 2e92ffdcdb77ce58fdc9af76aa30712933b72131 | |
| parent | e3e563fa08b874044ad9376a9502650793196089 (diff) | |
| download | emacs-80174d35b9e39d37b5e1ebf5b8a10d012986ba9f.tar.gz emacs-80174d35b9e39d37b5e1ebf5b8a10d012986ba9f.zip | |
(auto-mode-alist, magic-mode-alist): Use conf-mode
| -rw-r--r-- | lisp/files.el | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/lisp/files.el b/lisp/files.el index 6ade94cd14d..3c761f09d99 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1751,6 +1751,30 @@ in that case, this function acts as if `enable-local-variables' were t." | |||
| 1751 | ("BROWSE\\'" . ebrowse-tree-mode) | 1751 | ("BROWSE\\'" . ebrowse-tree-mode) |
| 1752 | ("\\.ebrowse\\'" . ebrowse-tree-mode) | 1752 | ("\\.ebrowse\\'" . ebrowse-tree-mode) |
| 1753 | ("#\\*mail\\*" . mail-mode) | 1753 | ("#\\*mail\\*" . mail-mode) |
| 1754 | ("\\.g\\'" . antlr-mode) | ||
| 1755 | ("\\.ses\\'" . ses-mode) | ||
| 1756 | ("\\.\\(soa\\|zone\\)\\'" . dns-mode) | ||
| 1757 | ("\\.docbook\\'" . sgml-mode) | ||
| 1758 | ("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode) | ||
| 1759 | ;; Windows candidates may be opened case sensitively on Unix | ||
| 1760 | ("\\.\\(?:[iI][nN][iI]\\|[lL][sS][tT]\\|[rR][eE][gG]\\|[sS][yY][sS]\\)\\'" . conf-mode) | ||
| 1761 | ("\\.\\(?:desktop\\|la\\)\\'" . conf-unix-mode) | ||
| 1762 | ("java.+\\.conf\\'" . conf-javaprop-mode) | ||
| 1763 | ("\\.properties\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-javaprop-mode) | ||
| 1764 | ;; *.cf, *.cfg, *.conf, *.config[.local|.de_DE.UTF8|...], */config | ||
| 1765 | ("[/.]c\\(?:on\\)?f\\(?:i?g\\)?\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-mode) | ||
| 1766 | ("\\`/etc/\\(?:DIR_COLORS\\|ethers\\|.?fstab\\|.*hosts\\|lesskey\\|login\\.?de\\(?:fs\\|vperm\\)\\|mtab\\|permissions\\|protocols\\|rpc\\|services\\)\\'" . conf-space-mode) | ||
| 1767 | ("\\`/etc/\\(?:aliases\\|ksysguarddrc\\|opera6rc\\)\\'" . conf-mode) | ||
| 1768 | ;; either user's dot-files or under /etc or some such | ||
| 1769 | ("/\\.?\\(?:gnokiirc\\|kde.*rc\\|mime\\.types\\|wgetrc\\)\\'" . conf-mode) | ||
| 1770 | ;; alas not all ~/.*rc files are like this | ||
| 1771 | ("/\\.\\(?:enigma\\|gltron\\|hxplayer\\|net\\|neverball\\|qt/.+\\|realplayer\\|scummvm\\|sversion\\|sylpheed/.+\\|xmp\\)rc\\'" . conf-mode) | ||
| 1772 | ("/\\.\\(?:gdbtkinit\\|grip\\|orbital/.+txt\\|rhosts\\|tuxracer/options\\)\\'" . conf-mode) | ||
| 1773 | ("/\\.?X\\(?:default\\|resource\\|re\\)s\\>" . conf-xdefaults-mode) | ||
| 1774 | ("/X11.+app-defaults/" . conf-xdefaults-mode) | ||
| 1775 | ("/X11.+locale/.+/Compose\\'" . conf-colon-mode) | ||
| 1776 | ;; this contains everything twice, with space and with colon :-( | ||
| 1777 | ("/X11.+locale/compose\\.dir\\'" . conf-javaprop-mode) | ||
| 1754 | ;; Get rid of any trailing .n.m and try again. | 1778 | ;; Get rid of any trailing .n.m and try again. |
| 1755 | ;; This is for files saved by cvs-merge that look like .#<file>.<rev> | 1779 | ;; This is for files saved by cvs-merge that look like .#<file>.<rev> |
| 1756 | ;; or .#<file>.<rev>-<rev> or VC's <file>.~<rev>~. | 1780 | ;; or .#<file>.<rev>-<rev> or VC's <file>.~<rev>~. |
| @@ -1761,11 +1785,7 @@ in that case, this function acts as if `enable-local-variables' were t." | |||
| 1761 | ;; for the sake of ChangeLog.1, etc. | 1785 | ;; for the sake of ChangeLog.1, etc. |
| 1762 | ;; and after the .scm.[0-9] and CVS' <file>.<rev> patterns too. | 1786 | ;; and after the .scm.[0-9] and CVS' <file>.<rev> patterns too. |
| 1763 | ("\\.[1-9]\\'" . nroff-mode) | 1787 | ("\\.[1-9]\\'" . nroff-mode) |
| 1764 | ("\\.g\\'" . antlr-mode) | 1788 | ("\\.\\(?:orig\\|in\\|[bB][aA][kK]\\)\\'" nil t))) |
| 1765 | ("\\.ses\\'" . ses-mode) | ||
| 1766 | ("\\.orig\\'" nil t) ; from patch | ||
| 1767 | ("\\.\\(soa\\|zone\\)\\'" . dns-mode) | ||
| 1768 | ("\\.in\\'" nil t))) | ||
| 1769 | "Alist of filename patterns vs corresponding major mode functions. | 1789 | "Alist of filename patterns vs corresponding major mode functions. |
| 1770 | Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL). | 1790 | Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL). |
| 1771 | \(NON-NIL stands for anything that is not nil; the value does not matter.) | 1791 | \(NON-NIL stands for anything that is not nil; the value does not matter.) |
| @@ -1847,16 +1867,17 @@ with that interpreter in `interpreter-mode-alist'.") | |||
| 1847 | 1867 | ||
| 1848 | (defvar magic-mode-alist | 1868 | (defvar magic-mode-alist |
| 1849 | '(;; The < comes before the groups (but the first) to reduce backtracking. | 1869 | '(;; The < comes before the groups (but the first) to reduce backtracking. |
| 1850 | ;; Is there a nicer way of getting . including \n? | 1870 | ;; Is there a nicer way of getting . including \n like Perl's //s? |
| 1851 | ;; TODO: UTF-16 <?xml may be preceded by a BOM 0xff 0xfe or 0xfe 0xff. | 1871 | ;; TODO: UTF-16 <?xml may be preceded by a BOM 0xff 0xfe or 0xfe 0xff. |
| 1852 | ("\\(?:<\\?xml\\s +[^>]*>\\)?\\s *<\\(?:!--\\(?:.\\|\n\\)*?-->\\s *<\\)*\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\)?\\s *\\(?:!--\\(?:.\\|\n\\)*?-->\\s *<\\)*[Hh][Tt][Mm][Ll]" . html-mode) | 1872 | ("\\(?:<\\?xml\\s +[^>]*>\\)?\\s *<\\(?:!--\\(?:.\\|\n\\)*?-->\\s *<\\)*\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\)?\\s *\\(?:!--\\(?:.\\|\n\\)*?-->\\s *<\\)*[Hh][Tt][Mm][Ll]" . html-mode) |
| 1853 | ;; These two must come after html, because they are more general: | 1873 | ;; These two must come after html, because they are more general: |
| 1854 | ("<\\?xml " . xml-mode) | 1874 | ("<\\?xml " . xml-mode) |
| 1855 | ("\\s *<\\(?:!--\\(?:.\\|\n\\)*?-->\\s *<\\)*!DOCTYPE " . sgml-mode) | 1875 | ("\\s *<\\(?:!--\\(?:.\\|\n\\)*?-->\\s *<\\)*!DOCTYPE " . sgml-mode) |
| 1856 | ("%![^V]" . ps-mode)) | 1876 | ("%![^V]" . ps-mode) |
| 1857 | "Alist of buffer beginnings vs corresponding major mode functions. | 1877 | ("# xmcd " . conf-unix-mode)) |
| 1878 | "Alist of buffer beginnings vs. corresponding major mode functions. | ||
| 1858 | Each element looks like (REGEXP . FUNCTION). FUNCTION will be | 1879 | Each element looks like (REGEXP . FUNCTION). FUNCTION will be |
| 1859 | called, unless it is nil.") | 1880 | called, unless it is nil (to allow `auto-mode-alist' to override).") |
| 1860 | 1881 | ||
| 1861 | (defun set-auto-mode (&optional keep-mode-if-same) | 1882 | (defun set-auto-mode (&optional keep-mode-if-same) |
| 1862 | "Select major mode appropriate for current buffer. | 1883 | "Select major mode appropriate for current buffer. |