aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2009-02-19 22:24:04 +0000
committerStefan Monnier2009-02-19 22:24:04 +0000
commit434f8c111b1fef3528bcc98a6e96c2d60705ff9a (patch)
tree6682ebc44842ca6cdaa100b9febd6ec196637fff
parentc9176b9f183e275620c3e25a51b5014ba09f1e19 (diff)
downloademacs-434f8c111b1fef3528bcc98a6e96c2d60705ff9a.tar.gz
emacs-434f8c111b1fef3528bcc98a6e96c2d60705ff9a.zip
(font-lock-fontify-syntactic-keywords-region):
Make sure we stop when we reach the limit.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/font-lock.el7
2 files changed, 7 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cd977569914..fb1ed4ab8f3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12009-02-19 Stefan Monnier <monnier@iro.umontreal.ca> 12009-02-19 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * font-lock.el (font-lock-fontify-syntactic-keywords-region):
4 Make sure we stop when we reach the limit.
5
3 * progmodes/sh-script.el (sh-font-lock-quoted-subshell): ' inside 6 * progmodes/sh-script.el (sh-font-lock-quoted-subshell): ' inside
4 a "..." does not quote anything. 7 a "..." does not quote anything.
5 8
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 9c1775b25cb..ccbf09b75ea 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1473,9 +1473,10 @@ START should be at the beginning of a line."
1473 ;; Find an occurrence of `matcher' from `start' to `end'. 1473 ;; Find an occurrence of `matcher' from `start' to `end'.
1474 (setq keyword (car keywords) matcher (car keyword)) 1474 (setq keyword (car keywords) matcher (car keyword))
1475 (goto-char start) 1475 (goto-char start)
1476 (while (if (stringp matcher) 1476 (while (and (< (point) end)
1477 (re-search-forward matcher end t) 1477 (if (stringp matcher)
1478 (funcall matcher end)) 1478 (re-search-forward matcher end t)
1479 (funcall matcher end)))
1479 ;; Apply each highlight to this instance of `matcher', which may be 1480 ;; Apply each highlight to this instance of `matcher', which may be
1480 ;; specific highlights or more keywords anchored to `matcher'. 1481 ;; specific highlights or more keywords anchored to `matcher'.
1481 (setq highlights (cdr keyword)) 1482 (setq highlights (cdr keyword))