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 0


From: martin rudalics
Subject: Re: font-locking and open parens in column 0
Date: Sat, 04 Nov 2006 12:35:03 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> beginning-of-defun has always been based on regexps and not on syntax, so
> open-paren-in-column-0-is-defun-start in there has no significant impact
> w.r.t. scanning from the beginning of the buffer or not: you can change
> defun-prompt-regexp instead and get the same result.

Does this mean we could use `syntax-ppss' and the car of the 9th field
instead and get rid of `open-paren-in-column-0-is-defun-start' once the
`forward-comment'/`find_defun_start' issue has been resolved?  Or,
better, give find_defun_start an additional argument, say "current", to
have it insist on finding the start of the current defun?

> ... and we haven't
> noticeably complexified our parsing technology (contrary to many other
> programming environments).

Once `parse-partial-sexp' is able to handle alternative comment styles
or syntax-table properties (instead of the current text property ersatz)
parsing from bob will get more expensive.

> syntax-ppss is used by font-lock but not only.  Whether you could use it for
> the other places where you use your cache?  I don't know.  I hope so.
> But if you can't I'd be interested to hear about it (mostly to figure out
> in which direction syntax-ppss should be improved).

`syntax-ppss' *is* a major improvement.  It lacks a documentation of how
its cache gets filled and a way to customize that.





reply via email to

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