5

After switching from Emacs 25 to Emacs 28 I started to get this warning message during the loading of my custom settings

.emacs.d/init.el: Warning: (lambda nil \.\.\.) quoted with ' rather than with #'

I upgraded all installed packages and everything works as expected, but I don't know what is this.

Drew
  • 75,699
  • 9
  • 109
  • 225
PinkCollins
  • 151
  • 8
  • 3
    It's a warning, not an error, so you can ignore it if you want, but you should probably fix it, if only to avoid being nagged. Search in your init.el for a single quote quoting a lambda expression: `'(lambda ` - you can just follow the recommendation of the warning and change it to `#'(lambda ` - but lambda expressions are self evaluating in any case, so there is probably no reason to quote it at all. However, you might want to post the relevant snippet from your init.el file in your question and ask how to fix it (if a fix is necessary). – NickD Oct 28 '22 at 15:23
  • 5
    Effectively, the Emacs compiler can compile `#'(lambda ...)` to byte code, whereas `'(lambda ...)` can be a plain lisp list which just happen to start with the atom `lambda`, so the compiler is not allowed to compile it. – Lindydancer Oct 28 '22 at 20:24
  • 1
    thanks. I corrected all ``'(lambda`` to `#'(lambda` in the `init.el` file and now the error disappeared. I wonder why this didn't happen with Emacs 25. Probably it was more tollerant (?) – PinkCollins Nov 02 '22 at 08:42

0 Answers0