F. Certainly.
F. Certainly.

Reputation: 179

How to fix this emacs warning: Warning (bytecomp): ‘mapcar’ called for effect; use ‘mapc’ or ‘dolist’ instead

Installed the latest emacs on Windows 7, copied package folders from last installation, updated packages. Getting warning (see below). Googling the warning shows some brief discussion from 2007, but nothing dumbed down for non-lispers. Does anyone know what this warning refers to and what the fix is?

Warning (bytecomp): ‘mapcar’ called for effect; use ‘mapc’ or ‘dolist’ instead

Upvotes: 2

Views: 881

Answers (1)

GDP2
GDP2

Reputation: 2008

Take a look at this answer from the Emacs stack exchange. If you read it, you will see that you have a couple of options for how to fix this problem:

  1. Add the following comments to the bottom of the file(s) causing the warning:

    ;; Local Variables:
    ;; byte-compile-warnings: (not mapcar)
    ;; End:
    
  2. Set the byte-compile-warnings variable via M-x customize-variable RET byte-compile-warnings RET. Click the Value Menu button and select Some by pressing 1, then check the box labeled mapcar. Finally, click Apply and Save.

The warning should stop appearing after you do one of these two things.

Upvotes: 1

Related Questions