Mercurial > emacs
changeset 60412:9b15aeb1b3f1
(font-lock-fontify-keywords-region): Ensure forward
progress, even with buggy anchored keywords.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 06 Mar 2005 00:02:04 +0000 |
parents | f13a9378709a |
children | 28b5c27160e8 |
files | lisp/ChangeLog lisp/font-lock.el |
diffstat | 2 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sat Mar 05 19:28:06 2005 +0000 +++ b/lisp/ChangeLog Sun Mar 06 00:02:04 2005 +0000 @@ -1,3 +1,8 @@ +2005-03-05 Stefan Monnier <monnier@iro.umontreal.ca> + + * font-lock.el (font-lock-fontify-keywords-region): Ensure forward + progress, even with buggy anchored keywords. + 2005-03-05 Luc Teirlinck <teirllm@auburn.edu> * simple.el (goto-line): Remove unbalanced final parenthesis.
--- a/lisp/font-lock.el Sat Mar 05 19:28:06 2005 +0000 +++ b/lisp/font-lock.el Sun Mar 06 00:02:04 2005 +0000 @@ -1,7 +1,7 @@ ;;; font-lock.el --- Electric font lock mode ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +;; 2000, 2001, 2002, 2003, 2004 2005 Free Software Foundation, Inc. ;; Author: jwz, then rms, then sm ;; Maintainer: FSF @@ -1425,7 +1425,10 @@ (while highlights (if (numberp (car (car highlights))) (font-lock-apply-highlight (car highlights)) - (font-lock-fontify-anchored-keywords (car highlights) end)) + (let ((pos (point))) + (font-lock-fontify-anchored-keywords (car highlights) end) + ;; Ensure forward progress. + (if (< (point) pos) (goto-char pos)))) (setq highlights (cdr highlights)))) (setq keywords (cdr keywords)))))