From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Zhongwei Yao Newsgroups: gmane.emacs.help Subject: Re: Problem when run-hook-with-args with closure Date: Fri, 19 Dec 2014 17:56:37 +0800 Message-ID: References: <87sigcngyx.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1418983025 25947 80.91.229.3 (19 Dec 2014 09:57:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Dec 2014 09:57:05 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 19 10:56:58 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 1Y1uIs-0004Eu-6i for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Dec 2014 10:56:58 +0100 Original-Received: from localhost ([::1]:57640 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1uIm-0002tj-Ej for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Dec 2014 04:56:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1uIa-0002tW-Vc for help-gnu-emacs@gnu.org; Fri, 19 Dec 2014 04:56:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1uIZ-00069P-C8 for help-gnu-emacs@gnu.org; Fri, 19 Dec 2014 04:56:40 -0500 Original-Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]:64142) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1uIZ-000697-1x for help-gnu-emacs@gnu.org; Fri, 19 Dec 2014 04:56:39 -0500 Original-Received: by mail-la0-f53.google.com with SMTP id gm9so522871lab.26 for ; Fri, 19 Dec 2014 01:56:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Wz/TP9WL01y5HBaJV7bm1clVFc6OsVncMP4mK7z6D+s=; b=yl1qlBRTfm3y2Fm00nfJc9ixUfXi/C/ahp6Vwlor15ccjvGaCvy2vdNFDrZ2WqJIxX 8YBQG+h9h7O/SEUjs3rCnYrpx6hon3Mklu/OtcfSzG1sDKUdMsUwOl4H7/INEhsRPNfU G93E5Wvp7N0rRW2l/TTs2FJdZYhrOLLskiNkg/9f3lXtkaIx+sBdW00k+CodqxjffsqH eLjV/tspGTD35GNg4pdS9+RLjyZnz4VMpH0QoM+naFupW+VgpILtnOEmGHq3qNKqcNmo YO4R3HvtNeOutOXMgdH8WXMP7shvAlIw/csjpObs6ptWiigZ3nG5oH7zax8IqEPwOKEm Z9kA== X-Received: by 10.152.42.169 with SMTP id p9mr6910134lal.94.1418982997393; Fri, 19 Dec 2014 01:56:37 -0800 (PST) Original-Received: by 10.114.59.80 with HTTP; Fri, 19 Dec 2014 01:56:37 -0800 (PST) In-Reply-To: <87sigcngyx.fsf@web.de> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::235 X-Content-Filtered-By: Mailman/MimeDel 2.1.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:101676 Archived-At: On Fri, Dec 19, 2014 at 5:09 PM, Michael Heerdegen wrote: > > 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. > > > Michael, Thanks. However, a problem (http://sourceforge.net/p/cedet/mailman/message/33153606/) in latest emacs (24.4.1) prevents me upgrading:( -- Zhongwei