[Top][All Lists]

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

[AUCTeX] Re: TeX-clean on closing buffer

From: Stefan Strohmeier
Subject: [AUCTeX] Re: TeX-clean on closing buffer
Date: Tue, 9 Nov 2010 16:51:40 +0100

Dear Ralf Angeli,

>> I am not sure if this is good coding. Any improvements are appreciated.
> Um, no, this is not really good coding.  More like the opposite. (c:
> Like this the hook will always be modified only buffer-locally when you
> set it.  This might have unwanted side effects.
> As mentioned above you should set the LOCAL argument of `add-hook'.  If
> you look at the description of `add-hook' which can be checked with `C-h
> f add-hook <RET>' then you'll see that this is the fourth argument.  So
> the solution you are looking for would look something like this:
> (add-hook 'LaTeX-mode-hook
>         (lambda ()
>           (add-hook 'kill-buffer-hook 'TeX-clean nil t)))

yet again thanks for the quick and professional help. I changed the code and it 
is working like a charm.


reply via email to

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