Skip to content

Commit

Permalink
fix: Byte compile warnings in files
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Aug 23, 2023
1 parent a8fe649 commit 0dc5b34
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 14 deletions.
40 changes: 28 additions & 12 deletions lisp/_prepare.el
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,25 @@
(require 'rect)
(require 'subr-x)

;;
;;; Externals

(defvar ansi-inhibit-ansi)
(defvar github-elpa-archive-dir)
(defvar github-elpa-recipes-dir)
(defvar package-build-default-files-spec)

(declare-function package-build-expand-files-spec "ext:package-build.el")
(declare-function github-elpa-build "ext:github-elpa.el")
(declare-function ansi-red "ext:ansi.el")
(declare-function ansi-blue "ext:ansi.el")
(declare-function ansi-green "ext:ansi.el")
(declare-function ansi-yellow "ext:ansi.el")
(declare-function ansi-white "ext:ansi.el")

;;
;;; Environments

;; Determine the underlying operating system
(defconst eask-is-windows (memq system-type '(cygwin windows-nt ms-dos))
"The system is Windows.")
Expand Down Expand Up @@ -47,6 +66,15 @@ Arguments FNC and ARGS are used for advice `:around'."
(unless (string= (nth 0 args) (eask-script "_prepare")) (apply fnc args)))
(advice-add 'load :around #'eask--load--adv)

(defconst eask-has-colors (getenv "EASK_HASCOLORS")
"Return non-nil if terminal support colors.")

(defconst eask-homedir (getenv "EASK_HOMEDIR")
"Eask temporary storage.")

(defconst eask-invocation (getenv "EASK_INVOCATION")
"Eask invocation program.")

;;
;;; Execution

Expand Down Expand Up @@ -466,18 +494,6 @@ full detials."
(let ((pkg-el (package--description-file default-directory)))
(when (file-readable-p pkg-el) pkg-el)))

;;
;;; Environments

(defconst eask-has-colors (getenv "EASK_HASCOLORS")
"Return non-nil if terminal support colors.")

(defconst eask-homedir (getenv "EASK_HOMEDIR")
"Eask temporary storage.")

(defconst eask-invocation (getenv "EASK_INVOCATION")
"Eask invocation program.")

;;
;;; Flags

Expand Down
8 changes: 8 additions & 0 deletions lisp/core/package.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))

;;
;;; Externals

(declare-function package-directory-recipe "ext:package-recipe.el")

;;
;;; Core

(defun eask-package-dir--patterns ()
"Return patterns for directory recipe."
(if eask-files
Expand Down
9 changes: 9 additions & 0 deletions lisp/core/status.el
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
(locate-dominating-file dir "_prepare.el"))
nil t))

;;
;;; Externals

(declare-function ansi-bright-black "ext:ansi.el")
(declare-function ansi-underscore "ext:ansi.el")

;;
;;; Core

(defun eask--environment-name ()
"Get the working environment name."
(cond ((eask-global-p) "global (~/.eask/)")
Expand Down
8 changes: 8 additions & 0 deletions lisp/generate/license.el
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
(locate-dominating-file dir "_prepare.el"))
nil t))

;;
;;; Externals

(defvar license-templates--data)

;;
;;; Core

(defun eask--print-license-menu ()
"Print all available license."
(eask-msg "available via `eask generate license`")
Expand Down
7 changes: 6 additions & 1 deletion lisp/init/cask.el
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@
(locate-dominating-file dir "_prepare.el"))
nil t))


;;
;;; Externals

(defvar -flatten)

(declare-function ansi-green "ext:ansi.el")
(declare-function ansi-yellow "ext:ansi.el")
(declare-function ansi-white "ext:ansi.el")

(declare-function cask--read "ext:cask.el")

;;
;;; Core

Expand Down
2 changes: 1 addition & 1 deletion lisp/init/keg.el
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

;; Copied from `keg.el'
(defun eask--keg-file-read (path)
"Return sexp from Keg file search from `deafult-directory'.
"Return sexp from Keg file (PATH) search from `deafult-directory'.
If no found the Keg file, returns nil."
(let (sources devs packages lint-disables scripts)
(when path
Expand Down
7 changes: 7 additions & 0 deletions lisp/lint/checkdoc.el
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
(locate-dominating-file dir "_prepare.el"))
nil t))

;;
;;; Externals
(defvar checkdoc-version)
(defvar checkdoc-create-error-function)

(declare-function checkdoc-buffer-label "ext:checkdoc.el")

;;
;;; Flags

Expand Down
8 changes: 8 additions & 0 deletions lisp/lint/declare.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))

;;
;;; Externals

(defvar check-declare-warning-buffer)

;;
;;; Core

(defun eask--check-declare-file (filename)
"Run check-declare on FILENAME."
(let* ((filename (expand-file-name filename))
Expand Down
5 changes: 5 additions & 0 deletions lisp/lint/elint.el
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
(locate-dominating-file dir "_prepare.el"))
nil t))

;;
;;; Externals

(declare-function elint-get-log-buffer "ext:elsa.el")

;;
;;; Flags

Expand Down
5 changes: 5 additions & 0 deletions lisp/lint/elisp-lint.el
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
(locate-dominating-file dir "_prepare.el"))
nil t))

;;
;;; Externals

(declare-function elisp-lint-file "ext:elsa.el")

;;
;;; Flags

Expand Down
8 changes: 8 additions & 0 deletions lisp/lint/elsa.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))

;;
;;; Externals

(defvar elsa-global-state)

(declare-function elsa-message-format "ext:elsa.el")
(declare-function elsa-analyse-file "ext:elsa.el")

;;
;;; Flags

Expand Down

0 comments on commit 0dc5b34

Please sign in to comment.