Skip to content

Commit

Permalink
Update source, eask-core.el
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 28, 2024
1 parent dd12281 commit b66e448
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions eask-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,12 @@ Argument BODY are forms for execution."
`(let* ((command (eask-command))
(before (concat "eask-before-" command "-hook"))
(after (concat "eask-after-" command "-hook")))
(run-hooks 'eask-before-command-hook)
(run-hooks (intern before))
,@body
(run-hooks (intern after))
(run-hooks 'eask-after-command-hook)))
(eask--unsilent
(run-hooks 'eask-before-command-hook)
(run-hooks (intern before))
,@body
(run-hooks (intern after))
(run-hooks 'eask-after-command-hook))))
(defmacro eask--setup-home (dir &rest body)
"Set up config directory in DIR, then execute BODY."
(declare (indent 1) (debug t))
Expand Down Expand Up @@ -335,14 +336,14 @@ Standard is, 0 (error), 1 (warning), 2 (info), 3 (log), 4 (debug), 5 (all)."
Execute forms BODY limit by the verbosity level (SYMBOL)."
(declare (indent 1) (debug t))
`(if (eask--reach-verbosity-p ,symbol) (progn ,@body)
`(if (eask-reach-verbosity-p ,symbol) (progn ,@body)
(eask--silent ,@body)))
(defmacro eask-with-verbosity-override (symbol &rest body)
"Define override verbosity scope.
Execute forms BODY limit by the verbosity level (SYMBOL)."
(declare (indent 1) (debug t))
`(if (eask--reach-verbosity-p ,symbol) (eask--unsilent ,@body)
`(if (eask-reach-verbosity-p ,symbol) (eask--unsilent ,@body)
(eask--silent ,@body)))
(defvar eask--ignore-error-p nil
"Don't trigger error when this is non-nil.")
Expand Down Expand Up @@ -1422,7 +1423,7 @@ ELPA)."
(`warn 1)
(`error 0)
(t symbol)))
(defun eask--reach-verbosity-p (symbol)
(defun eask-reach-verbosity-p (symbol)
"Return t if SYMBOL reach verbosity (should be printed)."
(>= eask-verbosity (eask--verb2lvl symbol)))
(defun eask--ansi (symbol string)
Expand Down

0 comments on commit b66e448

Please sign in to comment.