For the warning of
Package cl is deprecated
is there any easy fix for it?
Here is a piece of code I copied from somewhere (that I don't know how to fix):
(eval-when-compile (require 'cl))
(defun sanityinc/add-subdirs-to-load-path (parent-dir)
"Adds every non-hidden subdir of PARENT-DIR to `load-path'."
(let* ((default-directory parent-dir))
(progn
(setq load-path
(append
(remove-if-not
(lambda (dir) (file-directory-p dir))
(directory-files (expand-file-name parent-dir) t "^[^\\.]"))
load-path)))))
cl.el
is deprecated but not desupported. Deprecated does not mean desupported. You're encouraged to use its suggested replacement, butcl.el
still works just fine. – Drew Jul 20 '21 at 15:58cl.el
loaded. There's nothing wrong, in itself, with usingcl.el
. But apparently your version of Purcell's code is out of date - see @manuel's answer. This is part of the fallout of people changing to usecl-lib.el
: dependencies need to be updated/fixed. – Drew Jul 21 '21 at 15:31cl-lib
instead ofcl
. A more robust route is to stop using the package all together -- it is a package with the clear purpose of porting Common Lisp packages to Emacs. There are several constructs in it which is plain wrong from an Emacs Lisp point of view, but apparently they are designed that way since "that is how Common Lisp" do it. The drawback of the cl-lib debacle is that useful functions likeunion
no longer is available in normal elisp. – Lindydancer Mar 08 '23 at 05:53