(cons t (cons keywords
(mapcar 'font-lock-compile-keyword keywords))))
(if (and (not syntactic-keywords)
- (eq (or syntax-begin-function
- font-lock-beginning-of-syntax-function)
- 'beginning-of-defun)
+ (let ((beg-function
+ (or font-lock-beginning-of-syntax-function
+ syntax-begin-function)))
+ (or (eq beg-function 'beginning-of-defun)
+ (get beg-function 'font-lock-syntax-paren-check)))
(not beginning-of-defun-function))
;; Try to detect when a string or comment contains something that
;; looks like a defun and would thus confuse font-lock.