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: Mon, 11 Sep 2006 15:05:55 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> That is probably obsolete, from the days before C mode started using
> `c-beginning-of-syntax'.  This feature is no longer needed in C mode,
> since `c-beginning-of-syntax' prevents the confusion it was meant to warn
> the user about.

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':

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

(2) Execute

(defun foo ()
  (interactive)
  (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.





reply via email to

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