comparison lisp/font-lock.el @ 73100:20bdb0abafe2

(font-lock-compile-keywords): Allow value of syntax-begin-function to enable paren-column-0 highlighting.
author Richard M. Stallman <rms@gnu.org>
date Sun, 24 Sep 2006 20:37:58 +0000
parents cc737d1f33f9
children 57c68ed8bb9c
comparison
equal deleted inserted replaced
73099:59243837a57a 73100:20bdb0abafe2
1644 keywords 1644 keywords
1645 (setq keywords 1645 (setq keywords
1646 (cons t (cons keywords 1646 (cons t (cons keywords
1647 (mapcar 'font-lock-compile-keyword keywords)))) 1647 (mapcar 'font-lock-compile-keyword keywords))))
1648 (if (and (not syntactic-keywords) 1648 (if (and (not syntactic-keywords)
1649 (eq (or syntax-begin-function 1649 (let ((beg-function
1650 font-lock-beginning-of-syntax-function) 1650 (or font-lock-beginning-of-syntax-function
1651 'beginning-of-defun) 1651 syntax-begin-function)))
1652 (or (eq beg-function 'beginning-of-defun)
1653 (get beg-function 'font-lock-syntax-paren-check)))
1652 (not beginning-of-defun-function)) 1654 (not beginning-of-defun-function))
1653 ;; Try to detect when a string or comment contains something that 1655 ;; Try to detect when a string or comment contains something that
1654 ;; looks like a defun and would thus confuse font-lock. 1656 ;; looks like a defun and would thus confuse font-lock.
1655 (nconc keywords 1657 (nconc keywords
1656 `((,(if defun-prompt-regexp 1658 `((,(if defun-prompt-regexp