From b5e2c7a755cb352e9ac47095073e2c9eaa63c02b Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Wed, 4 Jul 2001 09:17:34 +0000 Subject: [PATCH] (c-font-lock-keywords-3): When matching something like `struct X Y', finish with point after Y. --- lisp/ChangeLog | 5 +++++ lisp/font-lock.el | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aa7ba593558..6cff9a10269 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-07-04 Gerd Moellmann + + * font-lock.el (c-font-lock-keywords-3): When matching something + like `struct X Y', finish with point after Y. + 2001-07-03 Eli Zaretskii * find-file.el (ff-find-the-other-file): Use file-name-nondirectory diff --git a/lisp/font-lock.el b/lisp/font-lock.el index d1315fbc794..424db62a064 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -2372,7 +2372,11 @@ See also `c-font-lock-extra-types'.") (list 1 'font-lock-keyword-face) (list ,(+ c-type-specs-depth 2) 'font-lock-type-face nil t) (list 'font-lock-match-c-style-declaration-item-and-skip-to-next - nil nil + nil + ;; Finish with point after the variable name if + ;; there is one. + `(if (match-end 2) + (goto-char (match-end 2))) ;; Fontify as a variable or function name. '(1 (if (match-beginning 2) font-lock-function-name-face -- 2.39.2