[Top][All Lists]

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

Re: Mysterious fontification/C++ context issue

From: Stefan Monnier
Subject: Re: Mysterious fontification/C++ context issue
Date: Sun, 10 Dec 2006 20:29:53 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

> beginning-of-defun unfortunately conflates (i) "beginning of a function" and
> (ii) "outermost level of parens", this arising because they coincide in
> the most important language (Lisp).  Having
> "beginning-of-defun-function" makes things even worse.

If you want a reliable solution for (ii), then use syntax-ppss (e.g. use the
syntax-ppss-toplevel-pos I proposed yesterday).

Beginning-of-defun *does not* conflate the two.  It has always been defined
as the meaning (i).  In just so happens that for performance reasons, people
have used it as a heuristic in syntax-begin-function to get an approximation
of (ii).  If you don't want that approximation, then don't set


reply via email to

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