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: martin rudalics
Subject: Re: font-locking and open parens in column zero
Date: Sun, 24 Sep 2006 11:42:07 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

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

It doesn't work for me provided I use something like

  (put font-lock-beginning-of-syntax-function
       'font-lock-syntax-paren-check t)

I'm probably too silly but using

  (put 'font-lock-beginning-of-syntax-function
       'font-lock-syntax-paren-check t)

instead and applying the patch below works for me.

*** font-lock.el        Sat Sep 23 11:08:56 2006        1.306
--- font-lock.el        Sun Sep 24 10:52:26 2006
***************
*** 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 (eval 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]