These exceptions ("Invalid search bound (wrong side of point)")
were observed in test suite file class-24.m when moving point
up and down a line at a time.
* lisp/progmodes/cc-engine.el (c-forward-declarator): In the
c-syntactic-re-search-forward ~30 lines from the end of the
function amend the regexp for objc-mode such that "@end"
terminates the search, but "<" doesn't.
* lisp/progmodes/cc-fonts.el
(c-make-font-lock-search-function): supply a non-nil
CHECK-POINT argument to c-make-font-lock-search-form.
(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))))
(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)