1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-05-01 02:31:23 -07:00

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.
This commit is contained in:
Stefan Monnier 2015-09-20 12:04:52 -04:00
parent 6afe8168dd
commit 9474c70a84

View file

@ -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.