From 89f216eb4259e08124b63b30e91ee7b7e1ae5030 Mon Sep 17 00:00:00 2001 From: JenChieh Date: Thu, 22 Feb 2024 23:49:31 -0800 Subject: [PATCH] Update docs --- docs/content/Development-API/_index.en.md | 16 ++++++++++++---- docs/content/Development-API/_index.zh-tw.md | 8 ++++++++ lisp/_prepare.el | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/content/Development-API/_index.en.md b/docs/content/Development-API/_index.en.md index 93f8a1c0..637943f4 100644 --- a/docs/content/Development-API/_index.en.md +++ b/docs/content/Development-API/_index.en.md @@ -107,6 +107,14 @@ Points to `lisp` directory from the project root. (message "%s" eask-lisp-root) ; path/to/eask/cli/lisp/ ``` +## 🔍 Function: eask-working-directory () + +Return the working directory of the program going to be executed. + +```elisp +(message "%s" (eask-working-directory)) ; path/to/current/work/space/ +``` + ## 🔍 Function: eask-command () Return the current command in string. Suppose the command is: @@ -166,7 +174,7 @@ Call another eask script. ## 🔍 Function: eask-import (`url`) -Load and evaluate the script from a url. +Load and evaluate the script from the url. ```elisp (eask-import "https://raw.githubusercontent.com/emacsmirror/emacswiki.org/master/yes-no.el") @@ -176,7 +184,7 @@ Load and evaluate the script from a url. ## 🔍 Macro: eask-defvc< (`version` &rest `body`) -Define scope if Emacs version is below specific version. +Define the scope if the Emacs version is below a specific version. `VERSION` is an integer and will be compared with `emacs-major-version`. @@ -292,7 +300,7 @@ The following output is with Emacs 28.1: Return a list of Eask files from DIR. -Consider following directory tree: +Consider the following directory tree: ``` . root @@ -311,7 +319,7 @@ The following output is with Emacs 28.1: Find the Eask-file from START-PATH. -Consider following directory tree: +Consider the following directory tree: ``` .project diff --git a/docs/content/Development-API/_index.zh-tw.md b/docs/content/Development-API/_index.zh-tw.md index 634f1c1a..2c5dea21 100644 --- a/docs/content/Development-API/_index.zh-tw.md +++ b/docs/content/Development-API/_index.zh-tw.md @@ -106,6 +106,14 @@ $ eask -- args0 args1 (message "%s" eask-lisp-root) ; path/to/eask/cli/lisp/ ``` +## 🔍 函式: eask-working-directory () + +傳回將要執行的程式的工作目錄。 + +```elisp +(message "%s" (eask-working-directory)) ; path/to/current/work/space/ +``` + ## 🔍 函式: eask-command () 返回字符串中的當前命令。假設命令是: diff --git a/lisp/_prepare.el b/lisp/_prepare.el index 83f93992..a45229bf 100644 --- a/lisp/_prepare.el +++ b/lisp/_prepare.el @@ -1024,7 +1024,7 @@ Argument BODY are forms for execution." result)) (defun eask-working-directory () - "Return the working directory of program is going to be executed." + "Return the working directory of the program going to be executed." (cond ((eask-config-p) user-emacs-directory) ((eask-global-p) (expand-file-name "../../" user-emacs-directory)) (t default-directory)))