I had a bug in one of my extensions that eventually turned out to be caused by set
not working as I expected:
;; -*- lexical-binding: t -*-
(let ((a nil))
(setq a t)
(print a))
(let ((a nil))
(set 'a t)
(print a))
when run with emacs -Q --batch -l temp.el
prints:
t
nil
This seems very strange to me. I was under the impression that (setq a b)
is shorthand for (set 'a b)
. What's going on?