From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Problem when run-hook-with-args with closure Date: Fri, 19 Dec 2014 10:10:09 +0100 Message-ID: <87ioh8ngu4.fsf@web.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1418980400 16380 80.91.229.3 (19 Dec 2014 09:13:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Dec 2014 09:13:20 +0000 (UTC) To: Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 19 10:13:13 2014 Return-path: Envelope-to: geh-help-gnu-emacs@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 1Y1tcW-0001ve-Mr for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Dec 2014 10:13:12 +0100 Original-Received: from localhost ([::1]:57427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1tcV-0006Rd-Vj for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Dec 2014 04:13:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1tcE-0006RP-8i for help-gnu-emacs@gnu.org; Fri, 19 Dec 2014 04:13:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1tc5-0003xG-Cd for help-gnu-emacs@gnu.org; Fri, 19 Dec 2014 04:12:54 -0500 Original-Received: from mout.web.de ([212.227.15.14]:62970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1tc5-0003wo-2j for help-gnu-emacs@gnu.org; Fri, 19 Dec 2014 04:12:45 -0500 Original-Received: from drachen.dragon ([90.186.139.244]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0MVu2q-1YQ05P3uFE-00X0FG; Fri, 19 Dec 2014 10:12:40 +0100 In-Reply-To: (Zhongwei Yao's message of "Thu, 18 Dec 2014 14:57:23 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:1j8YolVJ7UHiCqo/9AjLn3sj0f8= X-Provags-ID: V03:K0:2ks8whsIplzo/cpm3IfkxWU/o11WPBoxnbKorN+CCRvWhlaCLpP AMIHjF997Xi0bHl5PnEO8lZMVcxfbkDmXXE2IU9+J6RsXsT68ii52WwCxnSdq/UY9f/ooQS tiUS2vP+VIY3TtklUdStVKK4xO6qcqpnHByJtBU/I00sqqxclaPOraCwZX/UcU+BT2HM+0s F4iX6LTxC0RuwpPXXc3jQ== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.15.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101675 Archived-At: Zhongwei Yao writes: > Hi, list, > I try following code on both emacs 24.4.1 and 24.3.1: > > (setq lexical-binding t) > (let ((x 1)) > (setq foo > (lambda (y) > (message "x+y=%d" (+ x y))))) > (run-hook-with-args 'foo 1) > > On emacs 24.4.1, it runs and print: "x+y=2" as expected. > On emacs 24.3.1, it gives error: > run-hook-with-args: Symbol's function definition is void: closure That had been a bug in 24.3 IMO. > And 24.4.1 is OK. I also can't reproduce it using my trunk built. So it has seemingly be fixed. > How can I solve it on 24.3.1? I can't give an advice better than "try to avoid the problem" or "please upgrade". Michael.