]> code.delx.au - gnu-emacs/commitdiff
(magic-mode-alist, magic-fallback-mode-alist):
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 16 May 2007 16:13:12 +0000 (16:13 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 16 May 2007 16:13:12 +0000 (16:13 +0000)
Move the *ml, Postscript, and XmCD entries to the fallback part.

lisp/ChangeLog
lisp/files.el

index 13e5bf4f9a7d8d436c1bcde1d4017286ed36e43f..3ad1b5daa0d7f9c49b59c86f7f0a65466678c383 100644 (file)
@@ -1,5 +1,8 @@
 2007-05-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * files.el (magic-mode-alist, magic-fallback-mode-alist):
+       Move the *ml, Postscript, and XmCD entries to the fallback part.
+
        * files.el (magic-fallback-mode-alist):
        Rename from file-start-mode-alist.
 
index d022baad9a07c323b3a0f976e0fe96b00c669c85..322b28f293ea4052ea406fff821bf5488bd45377 100644 (file)
@@ -2120,8 +2120,20 @@ of the regular expression.  The mode is then determined as the mode
 associated with that interpreter in `interpreter-mode-alist'.")
 
 (defvar magic-mode-alist
-  `((image-type-auto-detected-p . image-mode)
-    ;; The < comes before the groups (but the first) to reduce backtracking.
+  `((image-type-auto-detected-p . image-mode))
+  "Alist of buffer beginnings vs. corresponding major mode functions.
+Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION).
+After visiting a file, if REGEXP matches the text at the beginning of the
+buffer, or calling MATCH-FUNCTION returns non-nil, `normal-mode' will
+call FUNCTION rather than allowing `auto-mode-alist' to decide the buffer's
+major mode.
+
+If FUNCTION is nil, then it is not called.  (That is a way of saying
+\"allow `auto-mode-alist' to decide for these files.\")")
+(put 'magic-mode-alist 'risky-local-variable t)
+
+(defvar magic-fallback-mode-alist
+  `(;; The < comes before the groups (but the first) to reduce backtracking.
     ;; TODO: UTF-16 <?xml may be preceded by a BOM 0xff 0xfe or 0xfe 0xff.
     ;; We use [ \t\r\n] instead of `\\s ' to make regex overflow less likely.
     (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)")
@@ -2140,19 +2152,6 @@ associated with that interpreter in `interpreter-mode-alist'.")
      . sgml-mode)
     ("%!PS" . ps-mode)
     ("# xmcd " . conf-unix-mode))
-  "Alist of buffer beginnings vs. corresponding major mode functions.
-Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION).
-After visiting a file, if REGEXP matches the text at the beginning of the
-buffer, or calling MATCH-FUNCTION returns non-nil, `normal-mode' will
-call FUNCTION rather than allowing `auto-mode-alist' to decide the buffer's
-major mode.
-
-If FUNCTION is nil, then it is not called.  (That is a way of saying
-\"allow `auto-mode-alist' to decide for these files.\")")
-(put 'magic-mode-alist 'risky-local-variable t)
-
-(defvar magic-fallback-mode-alist
-  nil
   "Like `magic-mode-alist' but has lower priority than `auto-mode-alist'.
 Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION).
 After visiting a file, if REGEXP matches the text at the beginning of the