mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-03 11:33:37 +00:00
(font-lock-compile-keywords): Allow value of
syntax-begin-function to enable paren-column-0 highlighting.
This commit is contained in:
parent
a3d76960ea
commit
9595af7e44
@ -1646,9 +1646,11 @@ If SYNTACTIC-KEYWORDS is non-nil, it means these keywords are used for
|
||||
(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.
|
||||
|
Loading…
Reference in New Issue
Block a user