My emacs stops working when I try to evaluate a piece of lisp code in the scratch buffer (with eval-last-sexp) or the minibuffer, with the above error. I cannot recover from this, I have to kill the emacs process.
The function is:
(defun add-to-list (val list-of-numbers)
(mapcar #'(lambda (num) (+ val num))
list-of-numbers))
I have tried on a fresh spacemacs installation to exclude that there is something wrong with my configuration file but I get the same problem.
This seems like a well formed function and the function name displays in the minibuffer after evaluation, so it seems to be evaluated fine. But then the above error occurs.
Can somebody explain based on this information?
add-to-list is a Emacs build-in function. Maybe the redefinition is here the source of your problem? What happens if you choose another function name?