I want to know the internal of debug. So I add just one (debug) in the entrance of test function, and step into it.
What I don't understand is, after I press a key (e.g. step), the step
function will call (exit-recursive-edit), and debug function kill
backtrace and exit. How can it receive more keys and step into test function (remember I just add one (debug) in the entrance of a test function)?
debug can be summarized to steps: 1. save parameter 2. generate *backtrace* buffer, change it to debugger-mode,
3. receive key stroke and do step/cont/etc 4. kill *backtrace*, restore parameter
The lines of code about step 3 seems to be ====== (let ((standard-output nil) (buffer-read-only t))
(message "") ;; Make sure we unbind buffer-read-only in the right buffer. (save-excursion (recursive-edit))) ======