# HG changeset patch # User Richard M. Stallman # Date 1139776228 0 # Node ID 9e3243a12c5fdccaf5a859e4a5891436b86e16ca # Parent 17c561f80e48bd4af557a0bd483dcdf31f45fdaa (magic-mode-alist): Don't use `\\s ' in regexps. diff -r 17c561f80e48 -r 9e3243a12c5f lisp/files.el --- a/lisp/files.el Sun Feb 12 20:29:57 2006 +0000 +++ b/lisp/files.el Sun Feb 12 20:30:28 2006 +0000 @@ -2024,18 +2024,19 @@ (defvar magic-mode-alist `(;; The < comes before the groups (but the first) to reduce backtracking. ;; TODO: UTF-16 \\s *<\\)"))) - (concat "\\(?:<\\?xml\\s +[^>]*>\\)?\\s *<" + (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\n]*<\\)"))) + (concat "\\(?:<\\?xml[ \t\n]+[^>]*>\\)?[ \t\n]*<" comment-re "*" - "\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\s *" comment-re "*\\)?" + "\\(?:!DOCTYPE[ \t\n]+[^>]*>[ \t\n]*<[ \t\n]*" comment-re "*\\)?" "[Hh][Tt][Mm][Ll]")) . html-mode) ;; These two must come after html, because they are more general: ("<\\?xml " . xml-mode) (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") - (comment-re (concat "\\(?:!--" incomment-re "*-->\\s *<\\)"))) - (concat "\\s *<" comment-re "*!DOCTYPE ")) + (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\n]*<\\)"))) + (concat "[ \t\n]*<" comment-re "*!DOCTYPE ")) . sgml-mode) ("%![^V]" . ps-mode) ("# xmcd " . conf-unix-mode))