[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] pageref folding
From: |
David Kastrup |
Subject: |
Re: [AUCTeX-devel] pageref folding |
Date: |
Wed, 18 Jan 2006 23:03:36 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Jiri Pejchal <address@hidden> writes:
> On 18/01/06, David Kastrup <address@hidden> wrote:
>
>> > Also I'd like to have TeX-fold-mode on by default. I added
>> > (TeX-fold-mode 1) to LaTeX-mode-hook.
>>
>> Well, I have my doubts that you did this right, so it would be worth
>> actually quoting the Lisp code with which you intended to do this.
>
> Sorry for not being clear. I actually want TeX-fold mode on and
> buffer to be folded
> initially.
>
> This is the code I have in .emacs:
> (add-hook 'LaTeX-mode-hook (lambda ()
> (TeX-fold-mode 1)
> (TeX-fold-buffer)))
>
> Then:
> \section{Heading}
> \label{sec:heading}
>
> Looks like this:
> Heading <-- small font, should be big (everything else is probably correct)
> [l]
>
> 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.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum