bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#72313: 31.0.50; Warning about cl-member possibly being undefined whe


From: Arash Esbati
Subject: bug#72313: 31.0.50; Warning about cl-member possibly being undefined when using cl-pushnew
Date: Sat, 27 Jul 2024 17:29:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text 
editors" <bug-gnu-emacs@gnu.org> writes:

>> So the conclusion is to simply (require 'cl-lib) instead of
>> (eval-when-compile (require 'cl-lib))?  But how can the byte-compiler
>> conclude that cl-member might not be defined at runtime given that it's
>> an autoloaded function?
>
> It's autoloaded from `cl-seq` when `cl-lib` is loaded.
> It's not autoloaded at startup.

How about this approach then?

--8<---------------cut here---------------start------------->8---
diff --git a/tex-info.el b/tex-info.el
index dc69762e..0f77e057 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -25,7 +25,8 @@
 ;;; Code:

 (eval-when-compile
-  (require 'cl-lib))
+  (require 'cl-lib)
+  (declare-function cl-member "cl-seq"))

 (require 'tex)
--8<---------------cut here---------------end--------------->8---

Best, Arash





reply via email to

[Prev in Thread] Current Thread [Next in Thread]