auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Clean on closing buffer


From: Ralf Angeli
Subject: Re: [AUCTeX] Clean on closing buffer
Date: Sat, 07 Mar 2009 17:55:41 +0100

* Colin Jia Zheng (2009-03-07) writes:

> I was trying to run TeX-clean on closing a tex file.
>
> (add-hook 'TeX-mode-hook
>     '(lambda ()

`lambda' does not need to be quoted because it quotes itself.

>     (make-local-hook 'kill-buffer-hook)
>     (add-hook 'kill-buffer-hook 'TeX-clean)))
>
> works but now TeX-clean also gets executed on AUCTEX's other buffers (latex
> output etc), which isn't desirable.  Looking forward to your help.

,----[ C-h f make-local-hook <RET> ]
| make-local-hook is a compiled Lisp function in `subr.el'.
| 
| (make-local-hook hook)
| 
| This function is obsolete since 21.1;
| not necessary any more.
| 
| Make the hook hook local to the current buffer.
| The return value is hook.
| 
| You never need to call this function now that `add-hook' does it for you
| if its LOCAL argument is non-nil.
`----

-- 
Ralf




reply via email to

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