aboutsummaryrefslogtreecommitdiff
path: root/create-license.el
diff options
context:
space:
mode:
Diffstat (limited to 'create-license.el')
-rw-r--r--create-license.el19
1 files changed, 18 insertions, 1 deletions
diff --git a/create-license.el b/create-license.el
index f1709d8..364b8c2 100644
--- a/create-license.el
+++ b/create-license.el
@@ -37,9 +37,26 @@
(defcustom create-license-directory
(file-name-as-directory (expand-file-name "licenses" user-emacs-directory))
- "Directory where licenses are stored."
+ "Directory where licenses are stored.
+
+`create-license' ignores files in this directory whose name start by a
+dot."
:group 'create-license
:type 'string)
+;;;###autoload
+(defun create-license (dir name)
+ "Copy the license NAME in DIR.
+
+The destination file name under DIR is given by
+`create-license-file-name'."
+ (interactive (list
+ default-directory
+ (completing-read
+ "License: "
+ (directory-files create-license-directory nil "^[^\\.].*"))))
+ (copy-file (expand-file-name name create-license-directory)
+ (expand-file-name create-license-file-name dir)))
+
(provide 'create-license)
;;; create-license.el ends here