[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el,v |
Date: |
Mon, 04 Dec 2006 08:08:08 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 06/12/04 08:08:07
Index: textmodes/sgml-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/sgml-mode.el,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -b -r1.118 -r1.119
--- textmodes/sgml-mode.el 21 May 2006 22:19:59 -0000 1.118
+++ textmodes/sgml-mode.el 4 Dec 2006 08:08:06 -0000 1.119
@@ -265,7 +265,10 @@
(1 (if (match-end 2) sgml-namespace-face font-lock-function-name-face))
(2 font-lock-function-name-face nil t))
;; FIXME: this doesn't cover the variables using a default value.
- (,(concat "\\(" sgml-namespace-re "\\)\\(?::\\("
+ ;; The first shy-group is an important anchor: it prevents an O(n^2)
+ ;; pathological case where we otherwise keep retrying a failing match
+ ;; against a very long word at every possible position within the word.
+ (,(concat "\\(?:^\\|[ \t]\\)\\(" sgml-namespace-re "\\)\\(?::\\("
sgml-name-re "\\)\\)?=[\"']")
(1 (if (match-end 2) sgml-namespace-face font-lock-variable-name-face))
(2 font-lock-variable-name-face nil t))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el,v,
Stefan Monnier <=