diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 721daf9d53f..abcc20fcb82 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -10219,7 +10219,11 @@ point unchanged and return nil." (prog1 (setq found (c-syntactic-re-search-forward - "[;:,]\\|\\(=\\|\\s(\\)" + ;; Consider making the next regexp a + ;; c-lang-defvar (2023-07-04). + (if (c-major-mode-is 'objc-mode) + "\\(?:@end\\)\\|[;:,]\\|\\(=\\|[[(]\\)" + "[;:,]\\|\\(=\\|\\s(\\)") limit 'limit t)) (setq got-init (and found (match-beginning 1)))) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index afbf841bcb1..5d5ada4c99d 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -387,7 +387,7 @@ (parse-sexp-lookup-properties (cc-eval-when-compile (boundp 'parse-sexp-lookup-properties)))) - ,(c-make-font-lock-search-form regexp highlights)) + ,(c-make-font-lock-search-form regexp highlights t)) nil))) (defun c-make-font-lock-BO-decl-search-function (regexp &rest highlights)