]> git.eshelyaron.com Git - emacs.git/commitdiff
(font-lock-compile-keywords): Allow value of
authorRichard M. Stallman <rms@gnu.org>
Sun, 24 Sep 2006 20:37:58 +0000 (20:37 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 24 Sep 2006 20:37:58 +0000 (20:37 +0000)
syntax-begin-function to enable paren-column-0 highlighting.

lisp/font-lock.el

index a63d726d2fde00421e53e030b1a6407e2142e567..28577bcdccdb05d640d73e4f32ff22d9acd1273b 100644 (file)
@@ -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.