diff options
author | Tristan Riehs <tristan.riehs@bordeaux-inp.fr> | 2024-03-16 12:40:33 +0100 |
---|---|---|
committer | Tristan Riehs <tristan.riehs@bordeaux-inp.fr> | 2024-03-16 12:40:33 +0100 |
commit | ac0bc578a386c5278dd12beb5ebf46b629c49c77 (patch) | |
tree | f887302cdbcc4920137619dede0e82cc5d8757fc | |
parent | 7a050e7252bd0e23bfe573ec9a057cebe66140ab (diff) |
Create a simple hook for dired-mode
-rw-r--r-- | create-license.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/create-license.el b/create-license.el index ba108ba..2f828c3 100644 --- a/create-license.el +++ b/create-license.el @@ -48,7 +48,12 @@ dot." :group 'create-license :type 'string) -(defcustom create-license-hook nil +(defun create-license--dired-update () + "Revert the current buffer if it is a `dired' buffer." + (when (eq major-mode 'dired-mode) + (revert-buffer))) + +(defcustom create-license-hook '(create-license--dired-update) "Hook run after `create-license'. Functions in this hook are called with no arguments." |