[Top][All Lists]

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

Re: XKCD/541 compliance, anyone?

From: Marcin Borkowski
Subject: Re: XKCD/541 compliance, anyone?
Date: Thu, 08 Jan 2015 02:09:43 +0100

On 2015-01-07, at 23:37, Stefan Monnier <> wrote:

>> Now this question remains: how to ensure that syntax-propertize is
>> getting called everywhere?
> Depends what you mean by "everywhere".  It "should" be called internally

Everywhere in the buffer.

> by things like forward-sexp, but currently isn't.
> What you can do is something like
>    (jit-lock-register (lambda (from to) (syntax-propertize to)) t)
> [ This needs to be called individually in each buffer.  ]
> It will make sure that all the visible text has been syntax-propertized,
> regardless of font-lock-mode.

Do I get it correctly that it's better than my solution (basically,
(syntax-propertize (point-max))) because it is faster for large buffer
("lazy smilification";-))?

And "calling in each buffer" will probably mean installing it in the
hook for modes I want it to work in.

(BTW, I love the fact that in the above sentence the closing paren of
the smiley is /not/ treated as the counterpart of the opening paren at
the beginning of the line.  Now that smileys start to "work" for me, I'm
going to use them more often :-) :-) ;-P).

>         Stefan

Thanks a lot

Marcin Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

reply via email to

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