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: Thu, 16 May 2019 17:09:51 +0200 Message-ID: <87zhnma11c.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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="156068"; 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 Thu May 16 17:10:52 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 1hRI1y-000eSG-Pa for ged-emacs-devel@m.gmane.org; Thu, 16 May 2019 17:10:50 +0200 Original-Received: from localhost ([127.0.0.1]:59758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRI1x-0004Cv-DK for ged-emacs-devel@m.gmane.org; Thu, 16 May 2019 11:10:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRI1M-0004Al-6l for emacs-devel@gnu.org; Thu, 16 May 2019 11:10:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRI1E-0007XB-Ad for emacs-devel@gnu.org; Thu, 16 May 2019 11:10:11 -0400 Original-Received: from mout.web.de ([212.227.15.14]:57203) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hRI1B-0007Lq-Nf for emacs-devel@gnu.org; Thu, 16 May 2019 11:10:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1558019393; bh=6CiXSzVQc2vp8Szj3mjxix77iX/MPxJWn/sSScCnlb4=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=OM1PGpwP+nVdwqK7YGZQI6a8uLSt9NNJqvFwxp3QNcMKkFfnWvjVtQ6LP8Dt+HvF4 5W88M5xabcRctdKoFkoAz3D/3ZIwdKdq3rXA7oS/4Dp5hKRqOGNgqL9wEFFidLn347 QM8S3Rb9dsbrA8fSWdIVxn5+NrvQiqN5gSUpK8fk= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([188.110.143.34]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LvOd9-1gjbSl3Rpr-010feW; Thu, 16 May 2019 17:09:52 +0200 In-Reply-To: <875zqabh3t.fsf@web.de> (Michael Heerdegen's message of "Thu, 16 May 2019 16:37:26 +0200") X-Provags-ID: V03:K1:ncbHy4DIL+Li/S0emYx0u1z3su0vwtRXEmkPpE1PJxbsTz7wBIF 8/fC4ZSuWE5zcFOZC6sB6bzzeF+rwtnSnr5bKC/+Rzgz/PhaFiwgwEuJqYyD6EK98iprHHX o6DzlESqWPlT9QYWnODGrh3TDtx352TKIW8MIPZ0l7dW36xSpJ+Cm12DqUo5Qs2EY/+ULr3 fsEepl9YSF9MvAJLFCshg== X-UI-Out-Filterresults: notjunk:1;V03:K0:4J1Y+nhcd+Y=:mCm18zooi1tKPFjIlr546D 18xV7+zdqFbrxg/uDWwOFyHP9JsXS+BEp04zor7wbQ0wvEp3F9cyIrs458nx4OwAnc5ksqwCX 4WPo2o8atnYEajBNiTnyYjVCvnrXOhkYNtf2RwZ9GPFvxdqZPQY9zr1nm9x6Tj4Cu7qAR3YBS m+H8aqWJeHwpwM5flbO0vdcFgdpzmIFDkv9MkMvYkTOIz+KifdeLNCXFeVAePA1cJJsgZ8GDD aoRkEhIpX/Q2F1nZ+zFOm8uv/o4gjRsHHdTvWz/qIemFkitTf+XiHYqHrCUyJIHO3VNuHt2lB kbwMQcmkjR/gGRr1nJDZZ7HgnrPAQmSS9TmR65IaDDkfXVWR9lWHAVcVX1q1S1Iv1XOsaOqoX OZHMJUTZVGxvZfnfqw5E5tWjTHXikGzH8+R63JxkExOPEbt1SyNRk/uAwQnpvZMSLuqJj6o0U PeRjPXEsey8RZHD7Tj+RhDmwsvQgnlNV75XMgUtT99YshafCDuKNorjKbwlH+pRUWkfwQhMHp LVTuimlTYAuU4fL3Av/YCuuKMvcMjeSQXQhqnZT5coN5hARPMozJI4jYFggzI6B9CI8wpnHZv QmWVva8rF9UxzqQKGLLXb9a2JoQCKegMpFW1u8lJbFgx4SNYj/QoyONftriLo2QqFnKyQYkc4 Z8xhZPR6QPo07kv/5pXQrwuoY5vXypRgXH47Jd4Iv3+7wR82aKLC+YTWYDlwuzyiqdACyG7Xj fSqpdf2CP/9NnJfQGwYFQoxBz94LzRsd5qhBF7r2MHC0FvKrqdBwUONGvKrucmqB51Fst9u1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.14 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:236585 Archived-At: --=-=-= Content-Type: text/plain Michael Heerdegen writes: > The problem in the second case is that `cl-symbol-macrolet' is too > eager: it also macroexpands the symbol expansion `p' inside the `setf', > i.e. it expands the `gv-synthetic-place' macro call, to just `cl', so > you get (setf cl 1). Something like this would help (i.e. gv-synthetic-place would work as expected): --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-WIP-Small-fix-in-cl-sm-macroexpand.patch Content-Transfer-Encoding: quoted-printable =46rom e6c6e2a360e7970c8c687af580b0fcabc11aaae7 Mon Sep 17 00:00:00 2001 From: Michael Heerdegen Date: Thu, 16 May 2019 17:05:07 +0200 Subject: [PATCH] WIP: Small fix in cl--sm-macroexpand =2D-- lisp/emacs-lisp/cl-macs.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 8af8fccde7..ce4be75d2b 100644 =2D-- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2152,7 +2152,8 @@ cl--sm-macroexpand ;; Perform symbol-macro expansion. (let ((symval (assq exp venv))) (when symval - (setq exp (cadr symval))))) + (setq exp (cadr symval)) + nil))) (`(setq . ,_) ;; Convert setq to setf if required by symbol-macro expansio= n. (let* ((args (mapcar (lambda (f) (macroexpand f env)) =2D- 2.20.1 --=-=-= Content-Type: text/plain but I have no clue if it's correct or a good idea. Symbol macro bindings to macro forms are rare in the Emacs sources. Michael. --=-=-=--