bug-auctex
[Top][All Lists]
Advanced

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

Re: [Bug-AUCTeX] 11.83; folding, fontification and noweb ie Rnw file


From: David Kastrup
Subject: Re: [Bug-AUCTeX] 11.83; folding, fontification and noweb ie Rnw file
Date: Wed, 20 Dec 2006 23:20:08 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

Ralf Angeli <address@hidden> writes:

> * Patrick Drechsler (2006-12-20) writes:
>
>>> (defvar pd-folding-done-p nil)
>>> (make-variable-buffer-local 'pd-folding-done-p)
>>> (add-hook 'LaTeX-mode-hook (lambda ()
>>>                          (unless pd-folding-done-p
>>>                            (TeX-fold-mode 1)
>>>                            (TeX-fold-buffer)
>>>                            (setq pd-folding-done-p t))))
>>
>> Thanks for taking the time Ralf!
>>
>> I have tried your code both using the Emacs version mentioned in the OP 
>> as well as with Emacs 23[1]. I do not see any difference in behaviour.
>
> Ugh, I should probably test the code before I post it.  But I'm quite
> baffled now because I thought this was a sure shot.
>
> The code does not work because in the hook the global value of
> `pd-folding-done-p' is checked.  When setting a breakpoint on
> `TeX-fold-buffer' I get the following backtrace:
>
> Debugger entered--entering a function:
> * TeX-fold-buffer()
>   (if pd-folding-done-p nil (TeX-fold-mode 1) (TeX-fold-buffer) (setq 
> pd-folding-done-p t))
>   (unless pd-folding-done-p (TeX-fold-mode 1) (TeX-fold-buffer) (setq 
> pd-folding-done-p t))
>   (lambda nil (unless pd-folding-done-p (TeX-fold-mode 1) (TeX-fold-buffer) 
> (setq pd-folding-done-p t)))()
>   run-hooks(text-mode-hook TeX-mode-hook LaTeX-mode-hook)
>   apply(run-hooks (text-mode-hook TeX-mode-hook LaTeX-mode-hook))
>   TeX-run-mode-hooks(text-mode-hook TeX-mode-hook LaTeX-mode-hook)
>   latex-mode()
>   noweb-select-mode()
>   noweb-post-command-function()
>   run-hooks(post-command-hook)
>
> 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)

[...]


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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