auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] pageref folding


From: Ralf Angeli
Subject: Re: [AUCTeX-devel] pageref folding
Date: Thu, 19 Jan 2006 09:00:06 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

* David Kastrup (2006-01-18) writes:

> Jiri Pejchal <address@hidden> writes:
>
>> I dont't exactly understand the comment about fontification in tex-fold.el,
>> but adding font-lock-fontify-buffer before TeX-fold-buffer solved the
>> problem for me.
>>
>> (add-hook 'LaTeX-mode-hook (lambda ()
>>                                 (TeX-fold-mode 1)
>>                                 (font-lock-fontify-buffer)
>>                                 (TeX-fold-buffer)
>>                                 ))
>
> Ok, you _did_ this right.  Many people have problems cooking up a
> non-argument lambda function from function calls which is the reason I
> was sceptical.  It seems like you found the solution, too.

It is still interesting that this doesn't work out-of-the-box.
`TeX-fold-buffer' calls `jit-lock-fontify-now' which should take care
of fontifying the buffer (putting aside XEmacs or cases where jit-lock
is disabled).  I am not sure what happens because I failed to debug
`jit-lock-fontify-now'.  (Somehow the function does not recognize the
macro `with-buffer-prepared-for-jit-lock' anymore after being
reevaluated with `C-u M-C-x'.)  Maybe the relevant font locking
functions have not registered themselves with `jit-lock-functions'
when `TeX-fold-buffer' is being called through `LaTeX-mode-hook'.

-- 
Ralf




reply via email to

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