From 93cc43a23c90247644cb21bfdae60b36b1057de2 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Wed, 25 Oct 2023 23:50:39 +0200 Subject: [PATCH] comp: don't require 'warnings' in comp-run * lisp/emacs-lisp/comp-run.el (warnings): Don't require. (warning-suppress-types): Wave warning. * lisp/emacs-lisp/warnings.el (warning-suppress-types): Autoload it. --- lisp/emacs-lisp/comp-run.el | 3 ++- lisp/emacs-lisp/warnings.el | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/comp-run.el b/lisp/emacs-lisp/comp-run.el index 9ea770135c1..b65c0997a3e 100644 --- a/lisp/emacs-lisp/comp-run.el +++ b/lisp/emacs-lisp/comp-run.el @@ -32,7 +32,6 @@ ;;; Code: (eval-when-compile (require 'cl-lib)) -(require 'warnings) (defgroup comp-run nil "Emacs Lisp native compiler runtime." @@ -243,6 +242,8 @@ processes from `comp-async-compilations'" (defvar comp-last-scanned-async-output nil) (make-variable-buffer-local 'comp-last-scanned-async-output) +;; From warnings.el +(defvar warning-suppress-types) (defun comp-accept-and-process-async-output (process) "Accept PROCESS output and check for diagnostic messages." (if native-comp-async-report-warnings-errors diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index 31b840d6c83..b99b1d2ae29 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el @@ -106,6 +106,7 @@ so only the element (FOO) will match it." :type '(repeat (repeat symbol)) :version "22.1") +;;;###autoload (defcustom warning-suppress-types nil "List of warning types not to display immediately. If any element of this list matches the TYPE argument to `display-warning', -- 2.39.2