unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Heime <heimeborgia@protonmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: [External] : Re: Passing result of macroexpand-all as argument to a function
Date: Wed, 09 Aug 2023 04:54:23 +0000	[thread overview]
Message-ID: <7od52OLy2Cf_LIW4RUoaZVEb9qahphp4uGJ-FOy3SrxHIQiMwprMXLFshs2gAIyYuqdKDuYwcdHT69qvy-Aqj74PgB4-M_2SXZy4XtQnLt4=@protonmail.com> (raw)
In-Reply-To: <871qgc6de3.fsf@web.de>






Sent with Proton Mail secure email.

------- Original Message -------
On Wednesday, August 9th, 2023 at 4:36 PM, Michael Heerdegen <michael_heerdegen@web.de> wrote:


> Heime heimeborgia@protonmail.com writes:
> 
> > So in practice, is it needed to quote or not the result of
> > (macroexpand-all something arg) ?
> 
> 
> The result of the `macroexpand-all' call is an expression (i.e. a list
> most the time). Just a normal list that happens to look like and being
> usable as code.

Not according to Drew, who says I got to quote.

In other words, you are saying that macroexpand-all gives me just a normal list 
which is not evaluated before being passed to the function. Correct ?  

And then having a function defined as so

(defun myfunc (expr bfname)

and calling 

(myfunc (macroexpand-all something arg) bfname)

will handle bfname properly.  It will not pick up anything from
the macroexpand-all data.  Am I right ?

> So unless you want 'EXPR instead of EXPR you don't need to quote: the
> result will not be evaluated (unless it's the returned expansion of a
> macro call, but then you want the evaluation).

I am doing (pp-to-string expr) inside

(defun myfunc (expr bfname)
  (apply 'talos (list (pp-to-string expr) bfname)))
 
> As I said, why don't you try?

I tried it, but then others claimed it was not good doing. 
 
> Michael.



  reply	other threads:[~2023-08-09  4:54 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-09  0:22 Passing result of macroexpand-all as argument to a function Heime
2023-08-09  1:37 ` Pierre Rouleau
2023-08-09  2:04   ` Heime
2023-08-09  2:26     ` Corwin Brust
2023-08-09  2:40       ` Heime
2023-08-09  2:27     ` [External] : " Drew Adams
2023-08-09  2:53       ` Heime
2023-08-09  4:02         ` Pierre Rouleau
2023-08-09  4:14         ` Drew Adams
2023-08-09  3:37       ` Michael Heerdegen
2023-08-09  4:13         ` Heime
2023-08-09  4:36           ` Michael Heerdegen
2023-08-09  4:54             ` Heime [this message]
2023-08-09 15:21               ` Drew Adams
2023-08-09  4:28         ` Drew Adams
2023-08-09  3:39     ` Michael Heerdegen
2023-08-09  5:06       ` Heime
2023-08-09 15:27         ` [External] : " Drew Adams
2023-08-09 20:34           ` Heime
2023-08-09 21:24             ` Drew Adams
2023-08-09 21:32               ` Heime

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='7od52OLy2Cf_LIW4RUoaZVEb9qahphp4uGJ-FOy3SrxHIQiMwprMXLFshs2gAIyYuqdKDuYwcdHT69qvy-Aqj74PgB4-M_2SXZy4XtQnLt4=@protonmail.com' \
    --to=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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).