I'm trying to turn off all colored text when using gnu emacs as emacs -nw
on linux. This answer gives a snippet of code to use for this purpose:
(cl-loop for face in (face-list) do
(set-face-attribute face nil :foreground nil :background nil))
However, when I put this in my .emacs file, I get this error:
Symbol's function definition is void: cl-loop
How do I fix this?
cl-loop
is fromcl-macs.el
. Have you tried adding(require 'cl-macs)
before usingcl-loop
? – Aquaactress Feb 22 '20 at 18:58cl-macs.el
is an internal subpackage of the packagecl-lib.el
. You should always(require 'cl-lib)
or(eval-when-compile (require 'cl-lib))
instead. See(cl) Organization
. – Basil Feb 22 '20 at 19:04cl-macs.el
is "an internal subpackage" or that "you should always...". What it says is that you can just loadcl-lib.el
to get the macros (and a bunch of other stuff) autoloaded. If you only need a macro for byte-compilation I see no reason why you would necessarily want to load all that's incl-lib.el
. Of course there's nothing wrong with loadingcl-lib.el
, and yes, it's generally what people do who want some of its functionality. – Drew Feb 23 '20 at 02:27