Mercurial > emacs
comparison lisp/font-lock.el @ 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 | 8d1a39cde5e3 |
children | 8680359f80e1 c7d2b6ee3a80 29e773288013 |
comparison
equal
deleted
inserted
replaced
60411:f13a9378709a | 60412:9b15aeb1b3f1 |
---|---|
1 ;;; font-lock.el --- Electric font lock mode | 1 ;;; font-lock.el --- Electric font lock mode |
2 | 2 |
3 ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
4 ;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | 4 ;; 2000, 2001, 2002, 2003, 2004 2005 Free Software Foundation, Inc. |
5 | 5 |
6 ;; Author: jwz, then rms, then sm | 6 ;; Author: jwz, then rms, then sm |
7 ;; Maintainer: FSF | 7 ;; Maintainer: FSF |
8 ;; Keywords: languages, faces | 8 ;; Keywords: languages, faces |
9 | 9 |
1423 ;; specific highlights or more keywords anchored to `matcher'. | 1423 ;; specific highlights or more keywords anchored to `matcher'. |
1424 (setq highlights (cdr keyword)) | 1424 (setq highlights (cdr keyword)) |
1425 (while highlights | 1425 (while highlights |
1426 (if (numberp (car (car highlights))) | 1426 (if (numberp (car (car highlights))) |
1427 (font-lock-apply-highlight (car highlights)) | 1427 (font-lock-apply-highlight (car highlights)) |
1428 (font-lock-fontify-anchored-keywords (car highlights) end)) | 1428 (let ((pos (point))) |
1429 (font-lock-fontify-anchored-keywords (car highlights) end) | |
1430 ;; Ensure forward progress. | |
1431 (if (< (point) pos) (goto-char pos)))) | |
1429 (setq highlights (cdr highlights)))) | 1432 (setq highlights (cdr highlights)))) |
1430 (setq keywords (cdr keywords))))) | 1433 (setq keywords (cdr keywords))))) |
1431 | 1434 |
1432 ;;; End of Keyword regexp fontification functions. | 1435 ;;; End of Keyword regexp fontification functions. |
1433 | 1436 |