[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 10:58:57 +0200 |
> From: Uwe Brauer <oub@mat.ucm.es>
> Cc: Uwe Brauer <oub@mat.ucm.es>, emacs-devel@gnu.org
> Date: Thu, 11 Jan 2024 07:55:01 +0100
>
> > If you want a local hook setting, use the LOCAL argument of add-hook.
>
> Well
> this
> %%% eval: (add-hook (make-local-variable 'after-save-hook) 'backup-each-save)
>
> Worked nicely in the past (and is still recommended in the documentation
> of this package)
>
> However I found out that now the syntax
>
> %%% eval: (add-hook (make-local-variable 'after-save-hook) 'backup-each-save
> nil t)
>
> Makes it work again.
>
> Maybe the doc-string of after-save-hook could say something about it?
There's nothing special about after-save-hook, the LOCAL argument is a
standard feature of add-hook and is documented in its doc string.
Btw, I don't understand why you use make-local-variable here. I don't
think it's needed.