[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [elpa] externals/tempel 3acaf5546d: Introduce tempel--inhibit-hooks
From: |
Stefan Monnier |
Subject: |
Re: [elpa] externals/tempel 3acaf5546d: Introduce tempel--inhibit-hooks (Fix #32) |
Date: |
Sun, 13 Feb 2022 12:40:52 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Hi Daniel,
> +(defmacro tempel--inhibit-hooks (&rest body)
> + "Inhibit tempel hooks from running in BODY.
> +We don't use `inhibit-modification-hooks' since this also prevents hooks
> +from other packages from running."
> + (declare (indent 0))
> + `(cl-letf (((symbol-function #'tempel--field-modified) #'ignore)
> + ((symbol-function #'tempel--range-modified) #'ignore))
> + ,@body))
Just curious here: why use this instead of a (defvar
tempel--inhibit-hooks nil) and then let-binding it where appropriate and
testing it in `tempel--field/range-modified`?
Stefan
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [elpa] externals/tempel 3acaf5546d: Introduce tempel--inhibit-hooks (Fix #32),
Stefan Monnier <=