• Stefan Monnier's avatar
    Add support for lexical variables to the debugger's `e' command. · 56ea7291
    Stefan Monnier authored
    * lisp/emacs-lisp/debug.el (debug): Don't let-bind the debugger-outer-*
    vars, except for debugger-outer-match-data.
    (debugger-frame-number): Move check for "on a function call" from
    callers into it.  Add `skip-base' argument.
    (debugger-frame, debugger-frame-clear): Simplify accordingly.
    (debugger-env-macro): Only reset the state stored in non-variables,
    i.e. current-buffer and match-data.
    (debugger-eval-expression): Rewrite using backtrace-eval.
    * lisp/subr.el (internal--called-interactively-p--get-frame): Remove.
    (called-interactively-p):
    * lisp/emacs-lisp/edebug.el (edebug--called-interactively-skip): Use the new
    `base' arg of backtrace-frame instead.
    * src/eval.c (set_specpdl_old_value): New function.
    (unbind_to): Minor simplification.
    (get_backtrace_frame): New function.
    (Fbacktrace_frame): Use it.  Add `base' argument.
    (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
    (syms_of_eval): Export backtrace-eval.
    * src/xterm.c (x_focus_changed): Simplify.
    56ea7291
xterm.c 321 KB