]> code.delx.au - gnu-emacs/commitdiff
(magic-mode-alist): Allow for carriage-returns in html-mode entry.
authorGlenn Morris <rgm@gnu.org>
Mon, 23 Apr 2007 01:21:11 +0000 (01:21 +0000)
committerGlenn Morris <rgm@gnu.org>
Mon, 23 Apr 2007 01:21:11 +0000 (01:21 +0000)
lisp/files.el

index 9f3a73439a96e9b7b3aa7a20e8cf7e5e17f808a4..8aa06ddc877cb79a0f3a6490afc987c424d6a704 100644 (file)
@@ -2123,12 +2123,12 @@ associated with that interpreter in `interpreter-mode-alist'.")
   `((image-type-auto-detected-p . image-mode)
     ;; 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\n] instead of `\\s ' to make regex overflow less likely.
+    ;; We use [ \t\r\n] instead of `\\s ' to make regex overflow less likely.
     (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)")
-            (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\n]*<\\)")))
-       (concat "\\(?:<\\?xml[ \t\n]+[^>]*>\\)?[ \t\n]*<"
+            (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\r\n]*<\\)")))
+       (concat "\\(?:<\\?xml[ \t\r\n]+[^>]*>\\)?[ \t\r\n]*<"
                comment-re "*"
-               "\\(?:!DOCTYPE[ \t\n]+[^>]*>[ \t\n]*<[ \t\n]*" comment-re "*\\)?"
+               "\\(?:!DOCTYPE[ \t\r\n]+[^>]*>[ \t\r\n]*<[ \t\r\n]*" comment-re "*\\)?"
                "[Hh][Tt][Mm][Ll]"))
      . html-mode)
     ;; These two must come after html, because they are more general: