From 9474c70a8442e052bd7b192a515a4fdb1834f49a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 20 Sep 2015 12:04:52 -0400 Subject: [PATCH] Don't assume syntax-begin-function is a symbol. * lisp/font-lock.el (font-lock-compile-keywords): Don't assume syntax-begin-function is a symbol. --- lisp/font-lock.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index d93cf7184ca..e2660bfab91 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1752,7 +1752,8 @@ If SYNTACTIC-KEYWORDS is non-nil, it means these keywords are used for (if (and (not syntactic-keywords) (let ((beg-function syntax-begin-function)) (or (eq beg-function 'beginning-of-defun) - (get beg-function 'font-lock-syntax-paren-check))) + (if (symbolp beg-function) + (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. -- 2.39.2