* David Kastrup (2006-12-20) writes:

> Ralf Angeli <[EMAIL PROTECTED]> writes:
>
>> Now when I check `pd-folding-done-p' with `C-h v', the local value I
>> can see when using `C-h v' in the LaTeX buffer is not there.  Does
>> anybody have an idea why?
>
> (defun VirTeX-common-initialization ()
>   "Perform basic initialization."
>   (kill-all-local-variables)

Ah, right. Thanks for the help.

Then the following should work:

(setq pd-folding-done-p nil)
(make-variable-buffer-local 'pd-folding-done-p)
(put 'pd-folding-done-p 'permanent-local t)
(add-hook 'LaTeX-mode-hook (lambda ()
                             (unless pd-folding-done-p
                               (TeX-fold-mode 1)
                               (TeX-fold-buffer)
                               (setq pd-folding-done-p t))))

After that folding still behaves strange because an opened figure
environment does not get folded once you leave it with `C-p' or
`C-n'.  It works more reliable with `C-f' and `C-b'.  I'll try to have
a look at that ...

-- 
Ralf


_______________________________________________
bug-auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to