21

While compiling an Elisp package from github, I get the

Warning: Package cl is deprecated

How do I find out what triggers it?

The specific file that triggers this is tiny and has no CL code.

I think there should be a way to turn the warning into an error and get the stack trace. Has anyone done this before?

1
  • 1
    Go find cl.el and rename it. This way you will get a trace back from the debugger.
    – tom
    Jul 7, 2021 at 18:45

1 Answer 1

25

Try the following in an Emacs session with the code in question loaded up:

(require 'loadhist)
(file-dependents (feature-file 'cl))
6
  • if using 27.1 you can use (setq byte-complile-warnings '(not cl-functions)) accordingly to byte-complile-warnings documentation.
    – Muihlinn
    Sep 4, 2020 at 8:34
  • Hm, I tried that, in both my ~/.emacs and some system files (below /etc/emacs/site-start.d/, this being Debian/Ubuntu) but no luck. It also prevents emacs --daemon from working as the load hangs at the warning :-/ Dec 20, 2020 at 18:13
  • Use it interactively (like by pasting it into the scratch buffer and M-x eval-buffer), not in your init file.
    – wasamasa
    Dec 21, 2020 at 9:18
  • 2
    I get the same warning when starting emacs, but no output from the code above... :-(
    – AstroFloyd
    Apr 4, 2021 at 7:50
  • Correction of the comment that shows how to suppress the warning:(setq byte-compile-warnings '((not cl-functions)))
    – jobor
    Jan 13, 2022 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.