From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Constantin Kulikov Newsgroups: gmane.emacs.devel Subject: Anaphoric lambda macro doesn't work anymore? Date: Fri, 11 Dec 2015 17:07:48 +0300 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c15cd0268ab005269fd9f2 X-Trace: ger.gmane.org 1449842890 3267 80.91.229.3 (11 Dec 2015 14:08:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Dec 2015 14:08:10 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 11 15:08:09 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a7OMi-0004E6-Sv for ged-emacs-devel@m.gmane.org; Fri, 11 Dec 2015 15:08:09 +0100 Original-Received: from localhost ([::1]:47830 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7OMi-0002i8-Aq for ged-emacs-devel@m.gmane.org; Fri, 11 Dec 2015 09:08:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7OMP-0002dA-TS for emacs-devel@gnu.org; Fri, 11 Dec 2015 09:07:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7OMO-0007t1-VT for emacs-devel@gnu.org; Fri, 11 Dec 2015 09:07:49 -0500 Original-Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]:36586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7OMO-0007st-SA for emacs-devel@gnu.org; Fri, 11 Dec 2015 09:07:48 -0500 Original-Received: by qgcc31 with SMTP id c31so197472026qgc.3 for ; Fri, 11 Dec 2015 06:07:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=vuArWITuhBofovTsZREjCEFXjUQIT5cDJ9YTd47W/s4=; b=QVZC18/HMpTgGoeXw4b2YC6iavW9P/AoB3hs6bJL96hrzRcI4RT7zFJEUboeX1EvYo IS0eC1TFHvo1XmqlxqQS+COzBKhiAcbq/VWL0OdeSlSgQRW339JJ3IalbVUuDsXnyx33 E+ShF0afgeGtrBeuzR/njJVLOalj69qBjCqdhwQZ/OP9Zr6sxrY5e60tmuKB5dj/CWkz BqKrHOQlIR3pX8x6l/zljaM9Ms0jns1vM0Uii6FO1JrwCoAhv0ikpPhBsE6wmcMXrsc8 xflOT5L9UmUXwpPz8aDsz9lvI+3NOhGWu1Zyl/+X9RFhrbysCwf2JWTKPG5tIST3dNWf T3yQ== X-Received: by 10.140.95.2 with SMTP id h2mr22970280qge.91.1449842868389; Fri, 11 Dec 2015 06:07:48 -0800 (PST) Original-Received: by 10.55.175.130 with HTTP; Fri, 11 Dec 2015 06:07:48 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c04::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196112 Archived-At: --001a11c15cd0268ab005269fd9f2 Content-Type: text/plain; charset=UTF-8 https://github.com/rolandwalker/anaphora/blob/master/anaphora.el#L337 ``` (defmacro anaphoric-lambda (args &rest body) "Like `lambda', but the function may refer to itself as `self'. ARGS and BODY are otherwise as documented for `lambda'." (declare (debug lambda) (indent defun)) `(labels ((self ,args ,@body)) #'self)) ``` Some versions ago it was working(it seems to me that for 24.4 it works). (With cl-labels and lexical-binding I can do it, but it is not compatible with older emacses.) My current emacs-version is 25.0.50.1. --001a11c15cd0268ab005269fd9f2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
https://github.com/rolandwalker/anaphora/blob/maste= r/anaphora.el#L337

```
(defmacro = anaphoric-lambda (args &rest body)
=C2=A0 "Like `lambda&= #39;, but the function may refer to itself as `self'.
ARGS an= d BODY are otherwise as documented for `lambda'."
=C2=A0= (declare (debug lambda)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(indent defun))
=C2=A0 `(labels ((self ,args ,@body))
=C2=A0 =C2=A0 =C2=A0#'self))
```

=
Some versions ago it was working(it seems to me that for 24.4 it works= ).
(With cl-labels and lexical-binding I can do it, but it is not= compatible with older emacses.)

My current emacs-= version is 25.0.50.1.
--001a11c15cd0268ab005269fd9f2--