From: Heime <heimeborgia@protonmail.com>
To: Eduardo Ochs <eduardoochs@gmail.com>
Cc: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Re: Printing code made by a macro
Date: Sun, 06 Aug 2023 00:44:43 +0000 [thread overview]
Message-ID: <b6JP6oq2Vowh1sLh_z51t_scxn9ziSH3Vc7sTloo2ap4I_9SzeDSfoFQmB-l1MHFY0YF2a_7i-vkyG3Mnq3YPyV0dO5DpeipNwHE6v3h6II=@protonmail.com> (raw)
In-Reply-To: <CADs++6hqnGcjt+ZkpsMxpYpNKhz7axXGjF0YkqqTF+uxoGhCTg@mail.gmail.com>
------- Original Message -------
On Sunday, August 6th, 2023 at 12:31 PM, Eduardo Ochs <eduardoochs@gmail.com> wrote:
> On Sat, 5 Aug 2023 at 20:43, Heime <heimeborgia@protonmail.com> wrote:
>
> >
> > Is there a proper way to display the code produced by a macro ? Perhaps call
> > a function to print it by passing the macro command ?
> >
> > (print-code (mymacro (* 2 3) (* 5 8) ))
> >
> > Which would print (+ 3 8)
> >
> > How would one write print-code ?
>
>
> Hi Heime,
>
> eev has a function, called "find-eppm", that takes a sexp, expands it
> with macro-expand, pretty-prints the expansion, and displays the
> pretty-printed code in a temporary buffer.
You wrote eev ?
> If you'd like to try it, install eev, run this,
>
> (require 'eev-load)
>
> and then type `C-x C-e' after the last parenthesis here:
>
> (find-eppm '
>
> (define-minor-mode MAIN-mode
> "Help 1"
> :init-value t
> :global t
> :lighter (propertize " MAIN" 'face 'region))
>
> )
>
> The reason for the "(require 'eev-load)" is explained here:
>
> http://anggtwu.net/eev-intros/find-eev-quick-intro.html#1
> http://anggtwu.net/eev-current/eev-load.el.html#autoloads
>
> Cheers,
> Edrx
>
next prev parent reply other threads:[~2023-08-06 0:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-05 23:42 Printing code made by a macro Heime
2023-08-06 0:31 ` Eduardo Ochs
2023-08-06 0:44 ` Heime [this message]
2023-08-06 0:50 ` Eduardo Ochs
2023-08-06 1:15 ` Heime
2023-08-06 2:16 ` Heime
2023-08-06 2:54 ` Eduardo Ochs
2023-08-06 3:36 ` Heime
2023-08-06 17:23 ` Heime
2023-08-06 20:36 ` Eduardo Ochs
2023-08-06 22:45 ` Heime
2023-08-06 23:11 ` Emanuel Berg
2023-08-06 18:10 ` Heime
2023-08-06 5:04 ` Eli Zaretskii
2023-08-06 6:22 ` Sebastian Miele
2023-08-07 19:54 ` Pierre Rouleau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='b6JP6oq2Vowh1sLh_z51t_scxn9ziSH3Vc7sTloo2ap4I_9SzeDSfoFQmB-l1MHFY0YF2a_7i-vkyG3Mnq3YPyV0dO5DpeipNwHE6v3h6II=@protonmail.com' \
--to=heimeborgia@protonmail.com \
--cc=eduardoochs@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).