From 7a050e7252bd0e23bfe573ec9a057cebe66140ab Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Fri, 15 Mar 2024 22:51:27 +0100 Subject: Create create-license-hook --- create-license.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/create-license.el b/create-license.el index cd7bf11..ba108ba 100644 --- a/create-license.el +++ b/create-license.el @@ -48,6 +48,13 @@ dot." :group 'create-license :type 'string) +(defcustom create-license-hook nil + "Hook run after `create-license'. + +Functions in this hook are called with no arguments." + :group 'create-license + :type 'hook) + (defvar create-license--hist nil "History for `create-license'.") @@ -67,8 +74,10 @@ The destination file name under DIR is given by nil)))) (if name - (copy-file (expand-file-name name create-license-directory) - (expand-file-name create-license-file-name dir)) + (progn + (copy-file (expand-file-name name create-license-directory) + (expand-file-name create-license-file-name dir)) + (run-hooks 'create-license-hook)) (message "No license found in \"%s\", you may want to run \ `create-license-download-common'" create-license-directory))) -- cgit v1.2.3