From 9595af7e4423d31d54e98971c3254c3659fd2ceb Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 24 Sep 2006 20:37:58 +0000 Subject: [PATCH] (font-lock-compile-keywords): Allow value of syntax-begin-function to enable paren-column-0 highlighting. --- lisp/font-lock.el | 8 +++++--- 1 file 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 (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. -- 2.39.2