all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jose A Ortega Ruiz <jao@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [nongnu] elpa/geiser bb9d5cb200: geiser-impl--normalize-method: quick fix for previous change
Date: Fri, 28 Jan 2022 20:47:02 +0000	[thread overview]
Message-ID: <87bkzva8qh.fsf@gnus.jao.io> (raw)
In-Reply-To: <jwvleyz62sd.fsf-monnier+emacs@gnu.org>

On Fri, Jan 28 2022, Stefan Monnier wrote:

>>      (let ((v (cadr m)))
>> -      (if (functionp v) m
>> -        `(,(car m)
>> -          ,(lambda (&rest _) v))))))
>> +      (if (functionp v) m `(,(car m) (lambda (&rest _) ,v))))))
>
> But this reintroduces the use of a list-that-looks-like-a-function
> instead of a true function.

yes... i just wanted to push quickly a fix for users of the unstable
version, and then think about it.

>
> BTW, one difference I can see is that the new code will basically pass
> `v` to `eval` whereas the code I had sent considers `v` to be
> a value already.

yes, that's the problem: v is the name of a variable, and we want to
evaluate its value when the function being defined is called, not when
the function is defined.

> So maybe the code I should have sent is along the lines of the
> patch below?

yes, that works, but i find it ugly to use eval explictly for the sake
of not using "a list-that-looks-like-a-function": what are the downsides
of the latter?  i understand that i'd be just hiding an implicit eval,
but is that all, or am i missing other drawbacks? (isn't, loosely
speaking, hiding evals one of things macros buy us?... the
version without eval looks more readable to me).

thanks,
jao
-- 
God is real, unless declared integer.



  reply	other threads:[~2022-01-28 20:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <164339989485.1614.11034229578358286224@vcs2.savannah.gnu.org>
     [not found] ` <20220128195815.4DB24C423B9@vcs2.savannah.gnu.org>
2022-01-28 20:16   ` [nongnu] elpa/geiser bb9d5cb200: geiser-impl--normalize-method: quick fix for previous change Stefan Monnier
2022-01-28 20:47     ` Jose A Ortega Ruiz [this message]
2022-01-28 21:16       ` Stefan Monnier
2022-01-28 23:07         ` Jose A Ortega Ruiz

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkzva8qh.fsf@gnus.jao.io \
    --to=jao@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.