The cl-lib package was introduced in Emacs 24.3 and contains a number of common Lisp functions, all with the cl- prefix. Prior to this, the only way to use these functions was to require the cl library and use unsigned names, for example. loop instead of cl-loop . However, this was discouraged by the possibility of name conflicts, and prefix names are generally recommended if possible.
Since you are using Emacs 24.3, the “correct” way to fix this would be to replace loop with cl-loop and return with cl-return :
(defun prelude-packages-installed-p () (cl-loop for p in prelude-packages when (not (package-installed-p p)) do (cl-return nil) finally (cl-return t)))
(You do not need (require 'cl-lib) because cl-loop and cl-return automatically loaded.)
Alternatively, you can add (require 'cl) to access unsigned names and leave the code as it is. This will also work with earlier versions of Emacs.
I cannot but notice that this function can be written more briefly:
(defun prelude-packages-installed-p () (cl-every 'package-installed-p prelude-packages))
The same goes for cl-every plus cl-lib vs every plus cl .
source share