emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: font-locking and open parens in column zero


From: Richard Stallman
Subject: Re: font-locking and open parens in column zero
Date: Sat, 23 Sep 2006 22:10:22 -0400

    We presume that major modes that introduce conflicting settings for
    `syntax-begin-function' and `font-lock-beginning-of-syntax-function' are
    on their own?

I don't think it is right to set both, but I suppose the latter
should take precedence.

I made a M-/ error before.  Please try this version of the patch.

*** font-lock.el        16 Sep 2006 13:50:14 -0400      1.306
--- font-lock.el        23 Sep 2006 15:23:43 -0400      
***************
*** 1646,1654 ****
          (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)
             (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.
--- 1646,1656 ----
          (cons t (cons keywords
                        (mapcar 'font-lock-compile-keyword keywords))))
      (if (and (not syntactic-keywords)
!            (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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]