emacs-devel
[Top][All Lists]
Advanced

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

Re: syntax-propertize-function vs indentation lexer


From: Stefan Monnier
Subject: Re: syntax-propertize-function vs indentation lexer
Date: Wed, 29 May 2013 13:52:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> However, syntax-propertize-function is only called from font-lock. So it
> only runs on the visible part of the buffer, and only when font-lock is
> enabled. So if neither of those conditions is present, the lexer fails
> on character constants. In particular, I have a test suite that runs in
> batch mode, when global-font-lock-mode is off.

"syntax propertization" is done lazily, so if/when you need it, you need
to call `syntax-propertize'.  In many cases it's done for you
(e.g. indent-according-to-mode makes sure it's propertized til the end
of the current line), but not in all cases.

Not sure why propertization isn't done for you in the case
of indentation.  Maybe because you sometimes look after the current line?
Or because your indentation doesn't go through indent-according-to-mode?


        Stefan



reply via email to

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