diff options
| author | Richard M. Stallman | 2006-09-24 20:37:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-09-24 20:37:58 +0000 |
| commit | 9595af7e4423d31d54e98971c3254c3659fd2ceb (patch) | |
| tree | 2d2e070336b0d5b5d180dcdacd257d1ade277205 | |
| parent | a3d76960eae4a9daff00967e4dc7936d7bb13e84 (diff) | |
| download | emacs-9595af7e4423d31d54e98971c3254c3659fd2ceb.tar.gz emacs-9595af7e4423d31d54e98971c3254c3659fd2ceb.zip | |
(font-lock-compile-keywords): Allow value of
syntax-begin-function to enable paren-column-0 highlighting.
| -rw-r--r-- | lisp/font-lock.el | 8 |
1 files 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 | |||
| 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. |