comp.emacs
[Top] [All Lists]

Re: Is lexical closure of elisp weeker than in clisp?

Subject: Re: Is lexical closure of elisp weeker than in clisp?
From: Daneel Yaitskov
Date: Fri, 08 Aug 2008 20:47:45 +0400
Newsgroups: comp.emacs


I have coined the following code:

(defmacro push-closing (the-lambda arg)
  `(lambda () (funcall the-lambda ,(eval arg))))

It can be replaced the snippet of a code where variables which must
copy to the context of a function needn't are change. For, example:
(defmacro push-closing (the-lambda arg)
  `(lambda () (interactive) (funcall ,the-lambda ,(eval arg))))

(local-set-key "q" (push-closing (lambda (b) (interactive)
                                       (kill-buffer b))
                                     buffer-of-mode))   

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy