From c1ebafd6b3845a2919ea214b5fe0f7afcc072207 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 5 Jun 2003 12:58:44 +0000 Subject: [PATCH] (font-lock-match-c-style-declaration-item-and-skip-to-next): Check (match-end 2) before goto there. --- lisp/font-lock.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 0883a086685..f877c12da1b 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -2048,7 +2048,8 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." ;; Move over any item value, etc., to the next item. (while (not (looking-at "[ \t\n]*\\(\\(,\\)\\|;\\|\\'\\)")) (goto-char (or (scan-sexps (point) 1) (point-max)))) - (goto-char (match-end 2))) + (if (match-end 2) + (goto-char (match-end 2)))) (error t))))) ;; Lisp. -- 2.39.5