From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Re: Printing code made by a macro Date: Sun, 06 Aug 2023 00:44:43 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31515"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Heime via Users list for the GNU Emacs text editor To: Eduardo Ochs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 06 02:45:51 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qSRu1-00080g-Rf for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 06 Aug 2023 02:45:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSRtH-0003KR-8v; Sat, 05 Aug 2023 20:45:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSRtF-0003KD-CV for help-gnu-emacs@gnu.org; Sat, 05 Aug 2023 20:45:01 -0400 Original-Received: from mail-40138.protonmail.ch ([185.70.40.138]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSRtD-0002fD-8r for help-gnu-emacs@gnu.org; Sat, 05 Aug 2023 20:45:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1691282695; x=1691541895; bh=X5U2EYgdMOcuiOKqf1oODXS2SLTREDSCmn+9cPgaWMs=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=DSUV8fpDE0PU6j2FhtCieXh4nitP0RSr9afC1XLum9YlmNA6hzvTGF8jCSsFSIGDq RftMo+XO+YlBjC+dhJGsDnEe/bh05I1FSguu7hEKXNvoAv/vFLDlTJH9lKW82FihXR fha77clP0OJeH9c1yqA7z33GXZ/IHoojbO+vweP4ooVKWJKqlBgKp6Zianu2azudbm 5XJlg9n3S2QfZuvrDqi+UGHxlWwQRIijXAVM9wcGWKe7n+rHcJ9RLrUmZegRkso0pr 2zljF08xuUHt5+C5dcH9BT3JIc5r9rySi9DKQQqccuYbmB9+4fP8CepBduq48QEOyq 2JxrQeMDP7ONA== In-Reply-To: Feedback-ID: 57735886:user:proton Received-SPF: pass client-ip=185.70.40.138; envelope-from=heimeborgia@protonmail.com; helo=mail-40138.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144627 Archived-At: ------- Original Message ------- On Sunday, August 6th, 2023 at 12:31 PM, Eduardo Ochs wrote: > On Sat, 5 Aug 2023 at 20:43, Heime wrote: >=20 > >=20 > > 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 ? > >=20 > > (print-code (mymacro (* 2 3) (* 5 8) )) > >=20 > > Which would print (+ 3 8) > >=20 > > How would one write print-code ? >=20 >=20 > Hi Heime, >=20 > 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.=20 You wrote eev ? > If you'd like to try it, install eev, run this, >=20 > (require 'eev-load) >=20 > and then type `C-x C-e' after the last parenthesis here: >=20 > (find-eppm ' >=20 > (define-minor-mode MAIN-mode > "Help 1" > :init-value t > :global t > :lighter (propertize " MAIN" 'face 'region)) >=20 > ) >=20 > The reason for the "(require 'eev-load)" is explained here: >=20 > http://anggtwu.net/eev-intros/find-eev-quick-intro.html#1 > http://anggtwu.net/eev-current/eev-load.el.html#autoloads >=20 > Cheers, > Edrx >