Function: edebug-unwrap*

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

Signature

(edebug-unwrap* SEXP)

Documentation

Return the SEXP recursively unwrapped.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/edebug.el.gz
(defun edebug-unwrap* (sexp)
  "Return the SEXP recursively unwrapped."
  (while (not (eq sexp (setq sexp (edebug-unwrap sexp)))))
  (cond
   ((consp sexp)
    (or (gethash sexp edebug--unwrap-cache)
	(let ((remainder sexp)
	      (current (cons nil nil)))
	  (prog1 current
	    (while
		(progn
		  (puthash remainder current edebug--unwrap-cache)
		  (setf (car current)
                        (edebug-unwrap* (car remainder)))
		  (setq remainder (cdr remainder))
		  (cond
		   ((atom remainder)
		    (setf (cdr current)
			  (edebug-unwrap* remainder))
		    nil)
                   ((gethash remainder edebug--unwrap-cache)
                    (setf (cdr current) (gethash remainder edebug--unwrap-cache))
		    nil)
		   (t (setq current
			    (setf (cdr current) (cons nil nil)))))))))))
   ((byte-code-function-p sexp)
    (apply #'make-byte-code
           (aref sexp 0) (aref sexp 1)
           (vconcat (mapcar #'edebug-unwrap* (aref sexp 2)))
           (nthcdr 3 (append sexp ()))))
   ((interpreted-function-p sexp)
    (make-interpreted-closure
     (aref sexp 0) (mapcar #'edebug-unwrap* (aref sexp 1))
     (mapcar (lambda (x) (if (consp x) (cons (car x) (edebug-unwrap* (cdr x))) x))
             (aref sexp 2))
     (documentation sexp 'raw) (interactive-form sexp)))
   (t sexp)))