Function: edebug--unwrap-frame

edebug--unwrap-frame is a byte-compiled function defined in edebug.el.gz.

Signature

(edebug--unwrap-frame FRAME)

Documentation

Remove Edebug's instrumentation from FRAME.

Strip it from the function and any unevaluated arguments.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/edebug.el.gz
(defun edebug--unwrap-frame (frame)
  "Remove Edebug's instrumentation from FRAME.
Strip it from the function and any unevaluated arguments."
  (cl-callf edebug-unwrap* (edebug--frame-fun frame))
  ;; We used to try to be careful to apply `edebug-unwrap' only to source
  ;; expressions and not to values, so we did not apply unwrap to the arguments
  ;; of the frame if they had already been evaluated.
  ;; But this was not careful enough since `edebug-unwrap*' gleefully traverses
  ;; its argument without paying attention to its syntactic structure so it
  ;; also "mistakenly" descends into the values contained within the "source
  ;; code".  In practice this *very* rarely leads to undesired results.
  ;; On the contrary, it's often useful to descend into values because they
  ;; may contain interpreted closures and hence source code where we *do*
  ;; want to apply `edebug-unwrap'.
  ;; So based on this experience, we now also apply `edebug-unwrap*' to
  ;; the already evaluated arguments.
  ;;(unless (edebug--frame-evald frame)
  (cl-callf (lambda (xs) (mapcar #'edebug-unwrap* xs))
      (edebug--frame-args frame)))