From: Richard M. Stallman Date: Sun, 24 Sep 2006 20:37:58 +0000 (+0000) Subject: (font-lock-compile-keywords): Allow value of X-Git-Tag: emacs-pretest-22.0.90~360 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9595af7e4423d31d54e98971c3254c3659fd2ceb;p=emacs.git (font-lock-compile-keywords): Allow value of syntax-begin-function to enable paren-column-0 highlighting. --- 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.