[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: prevent hook vanishing
From: |
John Mastro |
Subject: |
Re: prevent hook vanishing |
Date: |
Fri, 18 May 2018 06:58:01 -0700 |
akrl <akrl@sdf.org> wrote:
> How do I prevent emacs from removing a hook I've installed using
> something like: (add-hook 'after-change-functions 'render-buf nil t)
> in case of an error occur executing it?
> I would also be fine in being able to reinstall it somehow afterward.
Why not use `condition-case' in your hook function to catch the error
and respond appropriately? (There are also `with-demoted-errors' and
`ignore-errors', if there's nothing that needs to be except to suppress
the error)
John