>> Hmm... still can't reproduce it here. Can you reproduce it with `emacs -Q`?
>>
>> Also (stab in the dark), could you check (boundp 'edebug-all-defs) in
>> a few different buffers?
>
> Maybe I found it. For whatever reson I have
>
> (make-local-variable 'edebug-all-defs)
>
> in my emacs-lisp-mode-hook. Apparently, I needed it many years ago and
> it wasn't in the way till a couple of weeks or months ago.
Oh, so it ends up making the variable buffer-local before it gets
initialized, so it's both globally unbound and buffer-locally unbound.
Hence when the `defvar` is processed the global value gets initialized
but the buffer-local value stays unbound.
Do you happen to remember why you "needed it many years ago"?
I'm leaning towards considering this a "pilot error".
Stefan