aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/font-lock.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index a63d726d2fd..28577bcdccd 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1646,9 +1646,11 @@ If SYNTACTIC-KEYWORDS is non-nil, it means these keywords are used for
1646 (cons t (cons keywords 1646 (cons t (cons keywords
1647 (mapcar 'font-lock-compile-keyword keywords)))) 1647 (mapcar 'font-lock-compile-keyword keywords))))
1648 (if (and (not syntactic-keywords) 1648 (if (and (not syntactic-keywords)
1649 (eq (or syntax-begin-function 1649 (let ((beg-function
1650 font-lock-beginning-of-syntax-function) 1650 (or font-lock-beginning-of-syntax-function
1651 'beginning-of-defun) 1651 syntax-begin-function)))
1652 (or (eq beg-function 'beginning-of-defun)
1653 (get beg-function 'font-lock-syntax-paren-check)))
1652 (not beginning-of-defun-function)) 1654 (not beginning-of-defun-function))
1653 ;; Try to detect when a string or comment contains something that 1655 ;; Try to detect when a string or comment contains something that
1654 ;; looks like a defun and would thus confuse font-lock. 1656 ;; looks like a defun and would thus confuse font-lock.