> > 1. emacs -Q > > 2. Go to *scratch* (but it is happening anywhere) > > 2. Evaluate (number-to-string nil) and get error, do not press Q in > *Backtrace*, switch back to *scratch* > > 3. Try evaluating any defun with C-M-x it will give error: > elisp--eval-defun: Symbol’s function definition is void: nil > > 4. You can evaluate with C-x C-e on the end of the defun, but not in the > middle with C-M-x > > 5. Go to *Backtrace*, click q or erase *Backtrace*, come back and it > works again. > IIUC, this is a kind chicken-and-egg problem: eval-defun at that point does not work without a (require 'edebug), which executes (edebug-install-read-eval-functions), which puts an advice around eval-defun... Here's a patch, which I'm sure is not TRT, but which at least fixes that bug. Cc'ing Stefan, who wrote bae2cfe63c, who might have a better idea on how this should be done.