Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
32a0479a
Commit
32a0479a
authored
Nov 11, 2004
by
Stefan Monnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(magic-mode-alist): Reduce backtracking in the HTML regexp.
parent
32e2fb04
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
lisp/ChangeLog
lisp/ChangeLog
+5
-4
lisp/files.el
lisp/files.el
+7
-3
No files found.
lisp/ChangeLog
View file @
32a0479a
2004-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
* files.el (magic-mode-alist): Reduce backtracking in the HTML regexp.
* textmodes/sgml-mode.el (sgml-tag-text-p): New fun.
(sgml-parse-tag-backward): Use it to skip spurious < or >.
...
...
@@ -11,8 +13,7 @@
2004-11-10 Nick Roberts <nickrob@snap.net.nz>
* tooltip.el: Don't require cl, comint, gud, gdb-ui for
compilation. The resulting compiler warnings appear to be
harmless.
compilation. The resulting compiler warnings appear to be harmless.
2004-11-10 Daniel Pfeiffer <occitan@esperanto.org>
...
...
@@ -69,7 +70,7 @@
(diary-from-outlook-gnus, diary-from-outlook-rmail): Do not use
interactive-p; but rather new optional argument NOCONFIRM.
2004-11-09 Stefan <monnier@iro.umontreal.ca>
2004-11-09 Stefan
Monnier
<monnier@iro.umontreal.ca>
* emacs-lisp/easymenu.el (easy-menu-intern): Revert to no-downcasing.
(easy-menu-name-match): Revert correspondingly.
...
...
@@ -232,7 +233,7 @@
* emacs-lisp/easymenu.el (easy-menu-get-map): Fix last change.
2004-11-06 Stefan <monnier@iro.umontreal.ca>
2004-11-06 Stefan
Monnier
<monnier@iro.umontreal.ca>
* emacs-lisp/easymenu.el (easy-menu-get-map-look-for-name): Remove.
(easy-menu-lookup-name): New fun to replace it.
...
...
lisp/files.el
View file @
32a0479a
...
...
@@ -1866,10 +1866,14 @@ regular expression. The mode is then determined as the mode associated
with
that
interpreter
in
`
interpreter-mode-alist
'.
")
(defvar magic-mode-alist
'(;; The < comes before the groups (but the first) to reduce backtracking.
;; Is there a nicer way of getting . including \n like Perl's //s?
`(;; 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.
("
\\
(
?:<\\?xml\\s
+[^>]*>\\
)
?\\s
*<\\
(
?:!--\\
(
?:.\\|\n\\)*?-->\\s *<\\)*\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\)?\\s *\\(?:!--\\(?:.\\|\n\\
)
*?-->\\s
*<\\
)
*[Hh][Tt][Mm][Ll]
" . html-mode)
(,(let* ((incomment-re "
\\
(
?:[^-]\\|-[^-]\\)")
(comment-re (concat "\\(?:!--" incomment-re "*-->\\s *<\\)")))
(concat "\\(?:<\\?xml\\s +[^>]*>\\)?\\s *<"
comment-re "*"
"\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\s *" comment-re "*\\)?"
"[Hh][Tt][Mm][Ll]")) . html-mode)
;; These two must come after html, because they are more general:
("<\\?xml " . xml-mode)
("\\s *<\\(?:!--\\(?:.\\|\n\\
)
*?-->\\s
*<\\
)
*!DOCTYPE
" . sgml-mode)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment