aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2015-09-20 12:04:52 -0400
committerStefan Monnier2015-09-20 12:04:52 -0400
commit9474c70a8442e052bd7b192a515a4fdb1834f49a (patch)
treefd34f49c329e8fdc8441437eed713702630eb594
parent6afe8168dde7780853003dea2fb9e3a8ba57e2ea (diff)
downloademacs-9474c70a8442e052bd7b192a515a4fdb1834f49a.tar.gz
emacs-9474c70a8442e052bd7b192a515a4fdb1834f49a.zip
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.
-rw-r--r--lisp/font-lock.el3
1 files changed, 2 insertions, 1 deletions
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
1752 (if (and (not syntactic-keywords) 1752 (if (and (not syntactic-keywords)
1753 (let ((beg-function syntax-begin-function)) 1753 (let ((beg-function syntax-begin-function))
1754 (or (eq beg-function 'beginning-of-defun) 1754 (or (eq beg-function 'beginning-of-defun)
1755 (get beg-function 'font-lock-syntax-paren-check))) 1755 (if (symbolp beg-function)
1756 (get beg-function 'font-lock-syntax-paren-check))))
1756 (not beginning-of-defun-function)) 1757 (not beginning-of-defun-function))
1757 ;; Try to detect when a string or comment contains something that 1758 ;; Try to detect when a string or comment contains something that
1758 ;; looks like a defun and would thus confuse font-lock. 1759 ;; looks like a defun and would thus confuse font-lock.