emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog font-lock.el


From: Stefan Monnier
Subject: [Emacs-diffs] emacs/lisp ChangeLog font-lock.el
Date: Thu, 19 Feb 2009 22:24:07 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        09/02/19 22:24:06

Modified files:
        lisp           : ChangeLog font-lock.el 

Log message:
        (font-lock-fontify-syntactic-keywords-region):
        Make sure we stop when we reach the limit.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15360&r2=1.15361
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/font-lock.el?cvsroot=emacs&r1=1.347&r2=1.348

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15360
retrieving revision 1.15361
diff -u -b -r1.15360 -r1.15361
--- ChangeLog   19 Feb 2009 22:18:16 -0000      1.15360
+++ ChangeLog   19 Feb 2009 22:24:04 -0000      1.15361
@@ -1,5 +1,8 @@
 2009-02-19  Stefan Monnier  <address@hidden>
 
+       * font-lock.el (font-lock-fontify-syntactic-keywords-region):
+       Make sure we stop when we reach the limit.
+
        * progmodes/sh-script.el (sh-font-lock-quoted-subshell): ' inside
        a "..." does not quote anything.
 

Index: font-lock.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/font-lock.el,v
retrieving revision 1.347
retrieving revision 1.348
diff -u -b -r1.347 -r1.348
--- font-lock.el        10 Jan 2009 21:50:41 -0000      1.347
+++ font-lock.el        19 Feb 2009 22:24:06 -0000      1.348
@@ -1473,9 +1473,10 @@
       ;; Find an occurrence of `matcher' from `start' to `end'.
       (setq keyword (car keywords) matcher (car keyword))
       (goto-char start)
-      (while (if (stringp matcher)
+      (while (and (< (point) end)
+                  (if (stringp matcher)
                 (re-search-forward matcher end t)
-              (funcall matcher end))
+                    (funcall matcher end)))
        ;; Apply each highlight to this instance of `matcher', which may be
        ;; specific highlights or more keywords anchored to `matcher'.
        (setq highlights (cdr keyword))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]