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

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

Re: The function ‘cl-set-difference’ might not be defined at runtime


From: Jorge P . de Morais Neto
Subject: Re: The function ‘cl-set-difference’ might not be defined at runtime
Date: Tue, 14 Apr 2020 18:10:25 -0300

Hi Stefan.  Thank you for dedicating time to this thread!

Em [2020-04-14 ter 16:21:34-0400], Stefan Monnier escreveu:

>> Yes, `(require 'cl-lib)` at top level placates Flycheck.  But for the
>> last drop of efficiency, I tried to `(require 'cl-lib)` inside the body
>> of the function that calls cl-set-difference, and put at the top level:
>
> FWIW, I don't think it will be more efficient.

Well, I thought that putting `(require 'cl-lib)` inside the function
body would be more efficient by avoiding requiring cl-lib when that
function is not invoked (the file contains other functions).  But it
would only make a 0.08s difference, and only if cl-lib was not already
loaded anyway.

>> (declare-function cl-set-difference "cl-seq" (list1 list2 &rest cl-keys))
>> That does not placate Flycheck though.  Do you know why?  The 0.08s of
>> extra loading time will not kill anyone for sure (specially since this
>> is code for personal use and even I will use it only rarely), but if
>> there is an easy way to avoid it, I would like to know.
>
> (require 'seq) and then use `seq-difference`?
>

Just for curiosity, why would that be better?  Does seq load faster?  Or
is seq more likely to be already loaded?

Regards
-- 
- <https://jorgemorais.gitlab.io/justice-for-rms/>
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Free Software Supporter:
  <https://www.fsf.org/free-software-supporter/subscribe>



reply via email to

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