Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Nov 17, 2023
1 parent 6e4d778 commit 09d7ee7
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 9 deletions.
20 changes: 18 additions & 2 deletions docs/content/en/Development-API/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -753,17 +753,33 @@ to display.
2022-04-14 17:31:54 [ERROR] This is ERROR message
```

## 🔍 Function: eask-print (`msg` &rest `args`)

Standard output printing without newline.

```elisp
(eask-println "Print to stdout!")
```

## 🔍 Function: eask-println (`msg` &rest `args`)

Like the function `eask-print` but contains the newline at the end.

```elisp
(eask-println "Print to stdout! (with newline)")
```

## 🔍 Function: eask-msg (`msg` &rest `args`)

Like `message` function but will replace unicodes with color.
Like the `message` function but will replace unicode with color.

```elisp
(eask-msg "Print this message with newline!")
```

## 🔍 Function: eask-write (`msg` &rest `args`)

Like `eask-msg` function but without newline at the end.
Like the `eask-msg` function but without the newline at the end.

```elisp
(eask-write "Print this message without newline...")
Expand Down
16 changes: 16 additions & 0 deletions docs/content/zh-TW/Development-API/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,22 @@ $ cat /.log/messages.log
2022-04-14 17:31:54 [ERROR] 這是錯誤信息
```

## 🔍 函式: eask-print (`msg` &rest `args`)

標準輸出列印不含換行符。

```elisp
(eask-println "打印到標準輸出!")
```

## 🔍 函式: eask-println (`msg` &rest `args`)

與函數 `esk-print` 類似,但末尾包含換行符。

```elisp
(eask-println "打印到標準輸出! (有換行符)")
```

## 🔍 函式: eask-msg (`msg` &rest `args`)

類似於 `message` 函數,但會用顏色替換 unicode。
Expand Down
11 changes: 5 additions & 6 deletions lisp/_prepare.el
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@ character."
string))

(defun eask-princ (object &optional stderr)
"Like function `princ'; this is used as the stdin.
"Like function `princ'; with flag STDERR.
For argument OBJECT, please see function `princ' for the detials.
Expand All @@ -1549,28 +1549,27 @@ If optional argument STDERR is non-nil; use stderr instead."
(princ object (when stderr #'external-debugging-output))))

(defun eask-print (msg &rest args)
"Like function `eask-princ'; this is used as the stdin.
"Standard output printing without newline.
For arguments MSG and ARGS, please see function `eask--format-paint-kwds' for
the detials."
(eask-princ (apply #'eask--format-paint-kwds msg args)))

(defun eask-println (msg &rest args)
"Like function `eask-print' but contains newline at the end; this is also used
as the stdin.
"Like the function `eask-print' but contains the newline at the end.
For arguments MSG and ARGS, please see function `eask-print' for the detials."
(apply #'eask-print (concat msg "\n") args))

(defun eask-msg (msg &rest args)
"Like function `message' but replace unicodes with color.
"Like the function `message' but replace unicode with color.
For arguments MSG and ARGS, please see function `eask--format-paint-kwds' for
the detials."
(message (apply #'eask--format-paint-kwds msg args)))

(defun eask-write (msg &rest args)
"Like function `eask-msg' but without newline at the end.
"Like the function `eask-msg' but without newline at the end.
For arguments MSG and ARGS, please see function `eask-msg' for the detials."
(eask-princ (apply #'eask--format-paint-kwds msg args) t))
Expand Down
1 change: 0 additions & 1 deletion lisp/core/status.el
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
(eask--print-info `("Eask file" . ,(or eask-file "missing")))
(eask--print-info `("Eask-file Count" . ,(length (eask--find-files default-directory))))

(eask-println "")
;; XXX: Please increment the number everytime a new information is added!
(eask-info "(Total of %s states listed)" (+ 6 5 2)))

Expand Down

0 comments on commit 09d7ee7

Please sign in to comment.