[Top][All Lists]

[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: Mon, 11 Sep 2006 22:01:16 -0400

    When `c-beginning-of-syntax' doesn't find a cached position it calls
    `c-beginning-of-defun-1' which, on Emacs, calls `beginning-of-defun':

Do you think that is a bug?
Is it doing the wrong thing here?

    (1) With emacs -Q open ~/src/syntax.c

    (2) Execute

    (defun foo ()
       (re-search-forward "string-to-syntax")
       (forward-line 6)
       (recenter 0))

    This will fontify the entire body of `string_to_syntax' as a C string
    due to the left paren in column zero of the doc-string.

That seems like a bug to me, more or less.  But it doesn't seem to
happen often; I tried a little exploring in a C file and it usually
seems not to be fooled by open-parens in column 0.

Can you figure out what it is about this case that causes
it to fail?

reply via email to

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