Function: helpful--macroexpand-try
helpful--macroexpand-try is a natively 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 /nix/store/mvfc1hll8a1f23ivm3qmzj4bn64jr3x7-emacs-packages-deps/share/emacs/site-lisp/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))