emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Anaphoric lambda macro doesn't work anymore?


From: Constantin Kulikov
Subject: Re: Anaphoric lambda macro doesn't work anymore?
Date: Mon, 18 Jan 2016 13:41:36 +0300

> Try using: (require 'cl-lib)
Hmm... I think it has issues and inconsistency with old behavior, however I can not clearly remember why I don't like cl-labels.
One reason is that it will not work in old emacses and if I remember correctly in files without -*- lexical-binding: t -*- header.

M-: (require 'cl-lib)
M-: (defmacro alambda (args &rest body) `(cl-labels ((self ,args ,@body)) #'self))
M-: (setq lexical-binding t)
M-: (funcall (alambda (a b) (cl-flet ((a (b c) (> b c))) (let ((> a)) (if (a > b) (message "%s %s %s" a b (symbol-function 'self)) (self b a))))) 1 2)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]