FUEL: fix the lookup of user name for copyright headers
first ask Factor, then fuel-scaffold-developer-name then user-full-name and lastly "Your name"db4
parent
531332acd8
commit
5a2861aff0
|
@ -54,9 +54,10 @@
|
|||
(fuel-eval--retort-result (fuel-eval--send/wait cmd))))
|
||||
|
||||
(defun fuel-scaffold--dev-name ()
|
||||
(or fuel-scaffold-developer-name
|
||||
(let ((cmd '(:fuel* (developer-name get :get) "fuel")))
|
||||
(or (let ((cmd '(:fuel* (developer-name get :get) "fuel")))
|
||||
(fuel-eval--retort-result (fuel-eval--send/wait cmd)))
|
||||
fuel-scaffold-developer-name
|
||||
user-full-name
|
||||
"Your name"))
|
||||
|
||||
(defun fuel-scaffold--first-vocab ()
|
||||
|
@ -92,17 +93,17 @@ IN: %s
|
|||
t)))
|
||||
|
||||
(defsubst fuel-scaffold--create-docs (vocab)
|
||||
(let ((cmd `(:fuel* (,vocab ,fuel-scaffold-developer-name fuel-scaffold-help)
|
||||
(let ((cmd `(:fuel* (,vocab ,(fuel-scaffold--dev-name) fuel-scaffold-help)
|
||||
"fuel")))
|
||||
(fuel-eval--send/wait cmd)))
|
||||
|
||||
(defsubst fuel-scaffold--create-tests (vocab)
|
||||
(let ((cmd `(:fuel* (,vocab ,fuel-scaffold-developer-name fuel-scaffold-tests)
|
||||
(let ((cmd `(:fuel* (,vocab ,(fuel-scaffold--dev-name) fuel-scaffold-tests)
|
||||
"fuel")))
|
||||
(fuel-eval--send/wait cmd)))
|
||||
|
||||
(defsubst fuel-scaffold--create-authors (vocab)
|
||||
(let ((cmd `(:fuel* (,vocab ,fuel-scaffold-developer-name
|
||||
(let ((cmd `(:fuel* (,vocab ,(fuel-scaffold--dev-name)
|
||||
fuel-scaffold-authors) "fuel")))
|
||||
(fuel-eval--send/wait cmd)))
|
||||
|
||||
|
@ -145,8 +146,8 @@ IN: %s
|
|||
adds source and authors.txt files. Prompts the user for optional summary,
|
||||
tags, help, and test file creation.
|
||||
|
||||
You can configure `fuel-scaffold-developer-name' (set by default to
|
||||
`user-full-name') for the name to be inserted in the generated files."
|
||||
You can configure `fuel-scaffold-developer-name' for the name to
|
||||
be inserted in the generated files."
|
||||
(interactive)
|
||||
(let* ((name (read-string "Vocab name: " name-hint))
|
||||
(root (completing-read "Vocab root: "
|
||||
|
@ -157,8 +158,8 @@ You can configure `fuel-scaffold-developer-name' (set by default to
|
|||
(platforms (read-string "Vocab platforms (empty for all): "))
|
||||
(help (y-or-n-p "Scaffold help? "))
|
||||
(tests (y-or-n-p "Scaffold tests? "))
|
||||
(cmd `(:fuel* ((,root ,name ,fuel-scaffold-developer-name)
|
||||
(fuel-scaffold-vocab)) "fuel"))
|
||||
(cmd `(:fuel* ((,root ,name ,(fuel-scaffold--dev-name)
|
||||
(fuel-scaffold-vocab)) "fuel")))
|
||||
(ret (fuel-eval--send/wait cmd))
|
||||
(file (fuel-eval--retort-result ret)))
|
||||
(unless file
|
||||
|
@ -182,9 +183,9 @@ You can configure `fuel-scaffold-developer-name' (set by default to
|
|||
"Creates, if it does not already exist, a help file with
|
||||
scaffolded help for each word in the current vocabulary.
|
||||
|
||||
With prefix argument, ask for the vocabulary name.
|
||||
You can configure `fuel-scaffold-developer-name' (set by default to
|
||||
`user-full-name') for the name to be inserted in the generated file."
|
||||
With prefix argument, ask for the vocabulary name. You can
|
||||
configure `fuel-scaffold-developer-name' for the name to be
|
||||
inserted in the generated file."
|
||||
(interactive "P")
|
||||
(let* ((vocab (or (and (not arg) (factor-current-vocab))
|
||||
(fuel-completion--read-vocab nil)))
|
||||
|
@ -200,9 +201,9 @@ You can configure `fuel-scaffold-developer-name' (set by default to
|
|||
"Creates, if it does not already exist, a tests file for the current
|
||||
vocabulary.
|
||||
|
||||
With prefix argument, ask for the vocabulary name.
|
||||
You can configure `fuel-scaffold-developer-name' (set by default to
|
||||
`user-full-name') for the name to be inserted in the generated file."
|
||||
With prefix argument, ask for the vocabulary name. You can
|
||||
configure `fuel-scaffold-developer-name' for the name to be
|
||||
inserted in the generated file."
|
||||
(interactive "P")
|
||||
(let* ((vocab (or (and (not arg) (factor-current-vocab))
|
||||
(fuel-completion--read-vocab nil)))
|
||||
|
@ -217,9 +218,9 @@ You can configure `fuel-scaffold-developer-name' (set by default to
|
|||
"Creates, if it does not already exist, an authors file for the current
|
||||
vocabulary.
|
||||
|
||||
With prefix argument, ask for the vocabulary name.
|
||||
You can configure `fuel-scaffold-developer-name' (set by default to
|
||||
`user-full-name') for the name to be inserted in the generated file."
|
||||
With prefix argument, ask for the vocabulary name. You can
|
||||
configure `fuel-scaffold-developer-name' for the name to be
|
||||
inserted in the generated file."
|
||||
(interactive "P")
|
||||
(let* ((vocab (or (and (not arg) (factor-current-vocab))
|
||||
(fuel-completion--read-vocab nil)))
|
||||
|
|
Loading…
Reference in New Issue