[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX] Re: Clean on closing buffer
From: |
Colin Jia Zheng |
Subject: |
[AUCTeX] Re: Clean on closing buffer |
Date: |
Sat, 7 Mar 2009 17:10:00 +0000 (UTC) |
User-agent: |
Mutt/1.5.17-muttng (2007-11-01) |
Yes that's the problem. Thanks so much!
On Sat, Mar 07, 2009 at 05:55:41PM +0100, Ralf Angeli wrote:
> * 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