From d40e29a042c1886d5748480d789a8d7b36735a09 Mon Sep 17 00:00:00 2001 From: Jen-Chieh Shen Date: Mon, 18 Apr 2022 21:01:15 +0800 Subject: [PATCH] code: make sure the eask-file is defined before executing command --- lisp/_prepare.el | 20 +++++++++++--------- lisp/help/init | 8 ++++++++ 2 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 lisp/help/init diff --git a/lisp/_prepare.el b/lisp/_prepare.el index 139c2b28..5c6562d3 100644 --- a/lisp/_prepare.el +++ b/lisp/_prepare.el @@ -553,15 +553,17 @@ Eask file in the workspace." (user-init-file (locate-user-emacs-file "init.el")) (custom-file (locate-user-emacs-file "custom.el"))) (if (eask-file-try-load "../../") - (eask-msg "✓ Loading Eask file in %s... done!" eask-file) - (eask-msg "✗ Loading Eask file... missing!")) - (message "") - (package-activate-all) - (ignore-errors (make-directory package-user-dir t)) - (eask--silent (eask-setup-paths)) - (run-hooks 'eask-before-command-hook) - (run-hooks (intern (concat "eask-before-" (eask-command) "-hook"))) - (eask--with-hooks ,@body)))))))) + (progn + (eask-msg "✓ Loading Eask file in %s... done!" eask-file) + (message "") + (package-activate-all) + (ignore-errors (make-directory package-user-dir t)) + (eask--silent (eask-setup-paths)) + (run-hooks 'eask-before-command-hook) + (run-hooks (intern (concat "eask-before-" (eask-command) "-hook"))) + (eask--with-hooks ,@body)) + (eask-msg "✗ Loading Eask file... missing!") + (eask-help 'init))))))))) ;; ;;; Eask file diff --git a/lisp/help/init b/lisp/help/init new file mode 100644 index 00000000..daba9f45 --- /dev/null +++ b/lisp/help/init @@ -0,0 +1,8 @@ + +💡 You need to specify an Eask-file in your workspace; to create one use + + $ eask init + +💡 Or you can execute the command with the -g (--global) option + + $ eask [COMMAND] -g