From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Why is FUNC in cl-callf not allowed to be an expression? Date: Tue, 21 May 2019 01:25:59 +0200 Message-ID: <87k1ek673s.fsf@web.de> References: <874l631ek1.fsf@web.de> <87pnoqtuhm.fsf@web.de> <87r2961gox.fsf@web.de> <87mujohasa.fsf@web.de> <87a7fn3c6c.fsf@web.de> <875zqabh3t.fsf@web.de> <87zhnma11c.fsf@web.de> <871s0y3weo.fsf@web.de> <87tvdshew9.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="195930"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 21 01:32:48 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSrlw-000ooC-25 for ged-emacs-devel@m.gmane.org; Tue, 21 May 2019 01:32:48 +0200 Original-Received: from localhost ([127.0.0.1]:43644 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSrlv-0000kY-0I for ged-emacs-devel@m.gmane.org; Mon, 20 May 2019 19:32:47 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSrfY-0003N4-OI for emacs-devel@gnu.org; Mon, 20 May 2019 19:26:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSrfX-0002Kq-Rw for emacs-devel@gnu.org; Mon, 20 May 2019 19:26:12 -0400 Original-Received: from mout.web.de ([212.227.17.11]:41803) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSrfX-0002JP-Hh for emacs-devel@gnu.org; Mon, 20 May 2019 19:26:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1558394761; bh=xm4TBPxfpqjTeLupGuRR6wvH8/h7QQYuhZyoMKmU7GA=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Ire+P1pViU1xgAX0MSF1XLPeSZigSPuaZoIIFO3PselAgfZAvLjYXNCwc1phRgtWk K9yhpyospKccSBRfetiOxMdMtlojo4MMga386Lgm8B/OBlYnlaAPMpq//iB2o51QCI 2sGh/r7gJtwfOf6JaYeCY2Kh6EiiO3tj7KrgKbnk= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([188.110.143.34]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MJTVP-1hUFF42jxT-00369s; Tue, 21 May 2019 01:26:01 +0200 In-Reply-To: (Stefan Monnier's message of "Sat, 18 May 2019 10:09:41 -0400") X-Provags-ID: V03:K1:WQd3FRFnf7LKRNCs3Zr/xj9829/+0uj+NMopV8OoGoANMpcLl16 iXnW1Gwczkz4hEKX1IRsL9dVl+LL6GBI/G+mpbZj7R2QcJ7woH7GYCKmURXTPTj0np2q8S+ rfOIadKvqe10V8m9XodBJQ+JjArh1D/XLMyQI/NYIFl/Dlh9XyHO4LGEA8tAOmfCg04Fqw9 dI5Z+MzRabnLLeaKaKlxQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:sC8B8A/mr8g=:jjNEmUi6G0Shjgd0IXR6iq pDxmzOuR3dYBmqpEKNHR7Yr7mM4WwUTGa23/aKCLnFxt3rxJ3TtJD6bd5e4LvqTRDlp5Hmu6V Oc+7sjryxF46A6GQtBx7BEdzr7CtOfezTGb6IjCT63gO4DCHw5k3fXVVFN2WKXeQhKexpY22Y NGvHzxRdga8yeiQTk7W9LPngnU5qhA+IzwNxX8GKy99PaAsEu1mv6p9FmjDnmKGcfXvlUpduO Y1sOajxMoyv88I6elSAm0exkWUL0qygKs7VQqdtVTnKZWrJGKKUcDztgAJ4zwPJo0ParUBHW1 6wGN1oHlMOpKXHK16wqFn7L3ip7VVHfci5cUB54aq0oN25JPF8716/OKHxxsspw0i84vC9SC4 bgWPOwNO/ovIE0N3MW8mwHY29BefI9hsgWZ55VZa43AJ3oHSwwcXH9aUyyTEPgoZcLXNYqONk Hgqb6vJDkrTR+QJNbwo4dxhkWeC9yW/xYOzrbnZfmGWt231AFdqHnSOxrYF2/Krx22sZW48Hv S4n9x3IPBnJJQ7GML+jYPMDdx+oYUq9YO80ENpekrQMxWLVcJsXuNWBfCY0Qc+Ibpn17NeV+O 216s3l8VtYJxAOntO+BjTJXFpCQzKHnay99pTnLvqVTmD7wk1E9vbkKUjlH2uOEpa914QLLWa Ajv0lr1IM0OkIE8vGwjfCC2IO5TXbaKNnDX8n9VBCGXZHi8NTHYllt7O9XLrZIXUWLTzie1af VcD2a2b9uDSiEEpa3a5JzD7QRDdMYfrcdAI0qxUasB6H+CICm80NonQUpjZzhLvLUK2rKZbW X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.11 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236827 Archived-At: Stefan Monnier writes: > > My second point in this message: thinking once more about callf, we > > could also support a syntax like (callf (with EXPR) PLACE ARG) or > > something like that to support expressions as first arg. > > You can already do that, except that `with` is spelled `lambda (it)`: > > (cl-callf (lambda (it) EXPR) PLACE) Sorry that I haven't been clear: I want EXPR to eval to the function to be applied, not to the expression to set to. Like in (cl-callf (with (if flag #'1+ #'1-)) my-number) That's something I occasionally wanted. Yes, I know I can paraphrase this with cl-flet. It's still disappointing that cl-callf can't do it out of the box. Michael.