Function: helpful--macroexpand-try

helpful--macroexpand-try is a byte-compiled function defined in helpful.el.

Signature

(helpful--macroexpand-try FORM)

Documentation

Try to fully macroexpand FORM.

If it fails, attempt to partially macroexpand FORM.

Source Code

;; Defined in ~/.emacs.d/elpa/helpful-20250408.334/helpful.el
(defun helpful--macroexpand-try (form)
  "Try to fully macroexpand FORM.
If it fails, attempt to partially macroexpand FORM."
  (catch 'result
    (ignore-errors
      ;; Happy path: we can fully expand the form.
      (throw 'result (macroexpand-all form)))
    (ignore-errors
      ;; Attempt one level of macroexpansion.
      (throw 'result (macroexpand-1 form)))
    ;; Fallback: just return the original form.
    form))