Function: advice--make-interactive-form

advice--make-interactive-form is a byte-compiled function defined in nadvice.el.gz.

Signature

(advice--make-interactive-form FUNCTION MAIN)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/nadvice.el.gz
(defun advice--make-interactive-form (function main)
  ;; TODO: make it so that interactive spec can be a constant which
  ;; dynamically checks the advice--car/cdr to do its job.
  ;; For that, advice-eval-interactive-spec needs to be more faithful.
  (let* ((iff (advice--interactive-form function))
         (ifm (advice--interactive-form main))
         (fspec (cadr iff)))
    (when (eq 'function (car-safe fspec)) ;; Macroexpanded lambda?
      (setq fspec (nth 1 fspec)))
    (if (functionp fspec)
        `(funcall ',fspec ',(cadr ifm))
      (cadr (or iff ifm)))))