Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/content/Development-API/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ then,
Report error if the current command requires minimum `version`.

```elisp
(eask-start
(eask-command-check "27.1") ; The command requires 27.1 and above!
...
(eask-command-check "27.1") ; The command requires 27.1 and above!
```

## 🔍 Function: eask-command-p (`commands`)
Expand Down
4 changes: 1 addition & 3 deletions docs/content/Development-API/_index.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ eask init
如果目前的指令需要最低的 `version` 就會報錯。

```elisp
(eask-start
(eask-command-check "27.1") ; 此指令需要 27.1 及以上版本!
...
(eask-command-check "27.1") ; 此指令需要 27.1 及以上版本!
```

## 🔍 函式: eask-command-p (`commands`)
Expand Down
3 changes: 2 additions & 1 deletion lisp/_prepare.el
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ will return `lint/checkdoc' with a dash between two subcommands."
"Report error if the current command requires minimum VERSION."
(when (version< emacs-version version)
(eask-error "The command `%s' requires Emacs %s and above!"
(eask-command) version)))
(eask-s-replace "/" " " (eask-command)) ; Pretty print.
version)))

(defun eask-command-p (commands)
"Return t if COMMANDS is the current command."
Expand Down
10 changes: 8 additions & 2 deletions lisp/core/install-vc.el
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@

(eask-load "core/install")

;;
;;; Flags

(eask-command-check "29.1")

;;
;;; Core

(defun eask-install-vc--guess-name (file)
"Guess the package name of the install FILE."
(file-name-sans-extension (file-name-nondirectory (directory-file-name file))))
Expand Down Expand Up @@ -63,8 +71,6 @@
installed s skipped)))

(eask-start
(eask-command-check "29.1")

(eask-pkg-init)
(if-let* ((specs (eask-args)))
;; If package [specs..] are specified, we try to install it
Expand Down
10 changes: 8 additions & 2 deletions lisp/core/loc.el
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
(locate-dominating-file dir "_prepare.el"))
nil t))

;;
;;; Flags

(eask-command-check "28.1")

;;
;;; Core

(defvar eask-loc--lines 0)
(defvar eask-loc--chars 0)

Expand All @@ -35,8 +43,6 @@
(insert (format "| %s | %s | %s |\n" file lines chars)))))

(eask-start
(eask-command-check "28.1")

;; Preparation
(eask-archive-install-packages '("gnu" "melpa")
'markdown-mode)
Expand Down
4 changes: 2 additions & 2 deletions lisp/format/elisp-autofmt.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
;;
;;; Flags

(eask-command-check "29.1")

(advice-add #'eask-allow-error-p :override #'always)

;;
Expand All @@ -45,8 +47,6 @@
(kill-buffer))))

(eask-start
(eask-command-check "29.1")

;; Preparation
(eask-archive-install-packages '("gnu" "melpa")
'elisp-autofmt)
Expand Down
4 changes: 2 additions & 2 deletions lisp/lint/regexps.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
;;
;;; Flags

(eask-command-check "27.1")

(advice-add #'eask-allow-error-p :override #'always)

;;
Expand Down Expand Up @@ -59,8 +61,6 @@
(kill-this-buffer))))

(eask-start
(eask-command-check "27.1")

;; Preparation
(eask-archive-install-packages '("gnu")
'relint)
Expand Down
Loading