emacs-devel
[Top][All Lists]
Advanced

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

Re: is the after-save-hook changed?


From: Eli Zaretskii
Subject: Re: is the after-save-hook changed?
Date: Thu, 11 Jan 2024 08:43:34 +0200

> Date: Wed, 10 Jan 2024 21:30:51 +0100
> From:  Uwe Brauer via "Emacs development discussions." <emacs-devel@gnu.org>
> 
> I have used backup-each-save some years ago quite extensively.
> 
> Now I wanted, at least for some files, to use it again.
> 
> So I again started to use 
> (require 'backup-each-save)
> and locally in LaTeX file
> 
> --8<---------------cut here---------------start------------->8---
> %%% Local Variables:
> %%% mode: latex
> %%% TeX-master: t
> %%% vc-make-backup-files: t
> %%% eval: (add-hook (make-local-variable 'after-save-hook) 'backup-each-save)
> %%% End:
> --8<---------------cut here---------------end--------------->8---
> 
> 
> 
> 
> 
> However describe variable after-save-hook shows me in this file
> 
> ,----
> | 
> | after-save-hook is a variable defined in ‘files.el’.
> | 
> | Its value is (diff-hl-update t)
> | Original value was nil
> | Local in buffer test.tex; global value is (backup-each-save)
> `----
> 
> 
> So who is the culprit here?

If you want a local hook setting, use the LOCAL argument of add-hook.



reply via email to

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