unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 59786@debbugs.gnu.org
Subject: bug#59786: Allowing arbitrary expressions in cl-labels
Date: Fri, 13 Jan 2023 14:47:52 +0100	[thread overview]
Message-ID: <87r0vybl6f.fsf@web.de> (raw)
In-Reply-To: <jwv359xr3oy.fsf@iro.umontreal.ca> (Stefan Monnier's message of "Fri, 02 Dec 2022 14:44:13 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> The patch below uses this "new new" syntax (and adjusts `cl-flet` to
> also support this new new syntax).  It still lacks a NEWS entry (as
> well as updating the CL manual), but before I do that, I'd like to hear
> what other people think,

I like the idea to implement this kind of feature for `cl-labels'.  It's
a good change IMO.

I don't like the syntax I think (ugly).  The rest of this answer is
discussing this detail:

I don't recall all details about the ambiguity of the empty body case,
so forgive me if I'm missing something.

A binding like (my-fun (var1 var2)) with an empty body would give you
compiler warnings anyway.  Would this be an alternative to your "="
style syntax:

To specify a local function with an empty body one would have to use
local variable names starting with "_":

   (my-fun (_var1 _var2))

If not all variables start with an underscore or not all list members
are symbols, the binding is interpreted as specifying an expression
evaluating to the function to bind.  This assumes that "_var" never
specifies a named function.

Michael.






  parent reply	other threads:[~2023-01-13 13:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 19:44 bug#59786: Allowing arbitrary expressions in cl-labels Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-02 20:29 ` Drew Adams
2023-01-13 13:47 ` Michael Heerdegen [this message]
2023-01-15 17:11 ` Sean Whitton

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=87r0vybl6f.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=59786@debbugs.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 public inbox

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

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).