aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--create-license.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/create-license.el b/create-license.el
index a9a2e2c..f30e327 100644
--- a/create-license.el
+++ b/create-license.el
@@ -4,10 +4,8 @@
;; Author: Tristan Riehs <tristan.riehs@bordeaux-inp.fr>
;; Keywords: convenience license
-;; Version: 1.0.0
;; Maintainer: Tristan Riehs <tristan.riehs@bordeaux-inp.fr>
;; URL: https://tristanriehs.fr/git/create-license
-;; Package-Version: 1.0.1
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -96,10 +94,14 @@ The destination file name under DIR is given by
(list
default-directory
(let ((files (directory-files create-license-directory nil "^[^\\.].*")))
- (if files
- (completing-read "License: " files nil 'require-match
- nil 'create-license--hist (car create-license--hist))
- nil))))
+ (when files
+ (completing-read "License: "
+ files
+ nil
+ 'require-match
+ nil
+ 'create-license--hist
+ (car create-license--hist))))))
(if name
(progn
@@ -115,6 +117,7 @@ The destination file name under DIR is given by
"Download licenses listed in `create-license-common'."
(interactive)
(require 'url-handlers)
+ (make-directory create-license-directory t)
(dolist (license create-license-common)
(url-copy-file (cdr license)
(expand-file-name (car license) create-license-directory))))