branch: main commit 406ae0e2a5de67ddec76b7cea87fd4b77f0e8e39 Author: Tassilo Horn <t...@gnu.org> Commit: Tassilo Horn <t...@gnu.org>
Require cl-lib and subr-x at compile- and runtime cl-macros might expand to cl-functions (see bug#72313) and there's nothing wrong with requiring cl-lib (and the very small subr-x). --- bib-cite.el | 2 -- font-latex.el | 3 --- latex-flymake.el | 3 +-- latex.el | 5 ----- style/babel.el | 3 --- style/caption.el | 3 --- style/empheq.el | 2 -- style/enumitem.el | 2 -- style/floatrow.el | 4 ---- style/listings.el | 4 ---- style/mdframed.el | 3 --- style/pstricks.el | 2 -- style/tcolorbox.el | 4 ---- tex-fold.el | 3 --- tex-info.el | 3 --- tex.el | 5 ++--- toolbar-x.el | 3 +-- 17 files changed, 4 insertions(+), 50 deletions(-) diff --git a/bib-cite.el b/bib-cite.el index 5a9f6f83..fe5ae9e3 100644 --- a/bib-cite.el +++ b/bib-cite.el @@ -590,8 +590,6 @@ (require 'tex) (require 'latex) -(eval-when-compile - (require 'cl-lib)) ;; Silence the compiler: (declare-function reftex-view-crossref "ext:reftex-dcr" diff --git a/font-latex.el b/font-latex.el index 70186748..6cd5c24a 100644 --- a/font-latex.el +++ b/font-latex.el @@ -37,9 +37,6 @@ (require 'font-lock) (require 'tex) -(eval-when-compile - (require 'cl-lib)) - (defgroup font-latex nil "Font-latex text highlighting package." :prefix "font-latex-" diff --git a/latex-flymake.el b/latex-flymake.el index 5cffc924..e4c66171 100644 --- a/latex-flymake.el +++ b/latex-flymake.el @@ -34,8 +34,7 @@ ;;; Code: -(eval-when-compile - (require 'cl-lib)) +(require 'cl-lib) (require 'flymake) (defvar-local LaTeX--flymake-proc nil) diff --git a/latex.el b/latex.el index 66f50485..68d79caa 100644 --- a/latex.el +++ b/latex.el @@ -32,11 +32,6 @@ (require 'tex-style) (require 'tex-ispell) (require 'latex-flymake) -(eval-when-compile - (require 'cl-lib) - ;; Require subr-x.el for `string-trim' which wasn't autoloaded: - (when (< emacs-major-version 29) - (require 'subr-x))) ;; Silence the compiler for functions: (declare-function multi-prompt "multi-prompt") diff --git a/style/babel.el b/style/babel.el index 495e9f64..1147cce3 100644 --- a/style/babel.el +++ b/style/babel.el @@ -33,9 +33,6 @@ (require 'tex) (require 'latex) -(eval-when-compile - (require 'cl-lib)) - ;; Silence the compiler: (declare-function font-latex-add-keywords "font-latex" diff --git a/style/caption.el b/style/caption.el index 68366e84..ff9dcc00 100644 --- a/style/caption.el +++ b/style/caption.el @@ -34,9 +34,6 @@ ;;; Code: -(eval-when-compile - (require 'cl-lib)) - ;; Needed for compiling `LaTeX-check-insert-macro-default-style': (require 'latex) diff --git a/style/empheq.el b/style/empheq.el index 39c3f00e..534e3ceb 100644 --- a/style/empheq.el +++ b/style/empheq.el @@ -33,8 +33,6 @@ (require 'tex) (require 'latex) -(eval-when-compile - (require 'cl-lib)) ;; Silence the compiler: (declare-function font-latex-add-keywords diff --git a/style/enumitem.el b/style/enumitem.el index d03e4a0d..54566193 100644 --- a/style/enumitem.el +++ b/style/enumitem.el @@ -40,8 +40,6 @@ (require 'tex) (require 'latex) -(eval-when-compile - (require 'cl-lib)) ;; Silence the compiler: (declare-function font-latex-add-keywords diff --git a/style/floatrow.el b/style/floatrow.el index c0023687..872053bd 100644 --- a/style/floatrow.el +++ b/style/floatrow.el @@ -58,10 +58,6 @@ ;;; Code: -;; Needed for compiling `cl-pushnew': -(eval-when-compile - (require 'cl-lib)) - (require 'tex) (require 'latex) diff --git a/style/listings.el b/style/listings.el index d8e1dce2..ae6223f4 100644 --- a/style/listings.el +++ b/style/listings.el @@ -42,10 +42,6 @@ ;;; Code: -;; Needed for compiling `cl-pushnew': -(eval-when-compile - (require 'cl-lib)) - ;; Needed for auto-parsing: (require 'tex) (require 'latex) diff --git a/style/mdframed.el b/style/mdframed.el index b04f2f37..a28818b3 100644 --- a/style/mdframed.el +++ b/style/mdframed.el @@ -39,9 +39,6 @@ (require 'tex) (require 'latex) -;; Needed for compiling `cl-pushnew': -(eval-when-compile - (require 'cl-lib)) ;; Silence the compiler: (declare-function font-latex-add-keywords diff --git a/style/pstricks.el b/style/pstricks.el index f40db099..74f50118 100644 --- a/style/pstricks.el +++ b/style/pstricks.el @@ -62,8 +62,6 @@ (require 'tex) (require 'latex) -(eval-when-compile - (require 'cl-lib)) ;;; General Functions diff --git a/style/tcolorbox.el b/style/tcolorbox.el index edc39e23..60a57dac 100644 --- a/style/tcolorbox.el +++ b/style/tcolorbox.el @@ -41,10 +41,6 @@ ;;; Code: -;; Needed for compiling `cl-pushnew': -(eval-when-compile - (require 'cl-lib)) - ;; Needed for auto-parsing: (require 'tex) (require 'latex) diff --git a/tex-fold.el b/tex-fold.el index f7b1c32f..ee275ad7 100644 --- a/tex-fold.el +++ b/tex-fold.el @@ -43,9 +43,6 @@ ;;; Code: -(eval-when-compile - (require 'cl-lib)) - (require 'tex) (autoload 'LaTeX-forward-paragraph "latex") (autoload 'LaTeX-backward-paragraph "latex") diff --git a/tex-info.el b/tex-info.el index dc69762e..4ae14401 100644 --- a/tex-info.el +++ b/tex-info.el @@ -24,9 +24,6 @@ ;;; Code: -(eval-when-compile - (require 'cl-lib)) - (require 'tex) (require 'texinfo) diff --git a/tex.el b/tex.el index e67d2059..ab743d24 100644 --- a/tex.el +++ b/tex.el @@ -33,9 +33,8 @@ (require 'custom) (require 'tex-site) -(eval-when-compile - (require 'cl-lib) - (require 'subr-x)) +(require 'cl-lib) +(require 'subr-x) (require 'texmathp) ;; seq.el is preloaded in Emacs 29, so the next form can be removed ;; once 29 is the minimum required Emacs version diff --git a/toolbar-x.el b/toolbar-x.el index b1e8ec30..4f20d17d 100644 --- a/toolbar-x.el +++ b/toolbar-x.el @@ -94,8 +94,7 @@ ;;; Code: -(eval-when-compile - (require 'cl-lib)) +(require 'cl-lib) ;; Note that this just gives a useful default. Icons are expected to ;; be in subdirectory "images" or "toolbar" relative to the load-path.