[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-AUCTeX] 11.83; Fontification and folding bug
From: |
Ralf Angeli |
Subject: |
Re: [Bug-AUCTeX] 11.83; Fontification and folding bug |
Date: |
Sun, 24 Dec 2006 17:42:53 +0100 |
* Ralf Angeli (2006-12-21) writes:
> * Patrick Drechsler (2006-12-21) writes:
>
>> 0. Activate folding and syntax-highlighting in AUCTeX.
>> 1. Start Emacs. Create tex file (ie fold-highlight.tex) using `C-x C-f'.
>> 2. Enter this minimal example:
>>
>> ==============================
>> \documentclass{article}
>>
>> \begin{document}
>>
>> \section{Foo}
>> \label{sec:foo}
> [...]
>> This should look like (highlighting-wrong):
>>
>> http://img326.imageshack.us/img326/1402/shot002headlinesnopv9.png
>
> That's odd. Font locking should happen before folding, but it does
> not. At least it seems so.
I'm still not sure what's going on. And trying to debug the problem
feels like doing quantum physics where the result changes when being
measured. In the case at hand the problem does not occur when a
debugger is used. So this might be related to redisplay.
As a workaround you can use
(add-hook 'find-file-hook (lambda ()
(when (eq major-mode 'latex-mode)
(TeX-fold-mode 1)
(TeX-fold-buffer))))
instead of the code you currently use with `LaTeX-mode-hook'. This
has the additional bonus that you don't need an additional variable as
suggested regarding your problem with Noweb mode.
--
Ralf