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: Problem when run-hook-with-args with closure Date: Thu, 18 Dec 2014 14:57:23 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1418885867 31439 80.91.229.3 (18 Dec 2014 06:57:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Dec 2014 06:57:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 18 07:57:41 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 1Y1V1o-0008Sz-DP for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Dec 2014 07:57:40 +0100 Original-Received: from localhost ([::1]:52704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1V1n-0001Xn-51 for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Dec 2014 01:57:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1V1a-0001Xh-3k for help-gnu-emacs@gnu.org; Thu, 18 Dec 2014 01:57:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1V1Z-00043z-7R for help-gnu-emacs@gnu.org; Thu, 18 Dec 2014 01:57:26 -0500 Original-Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:61948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1V1Y-00043n-Vk for help-gnu-emacs@gnu.org; Thu, 18 Dec 2014 01:57:25 -0500 Original-Received: by mail-la0-f45.google.com with SMTP id gq15so476707lab.18 for ; Wed, 17 Dec 2014 22:57:23 -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=pIEE2zzhKUIQOSsEP+AzBbto4ojUBZ3mrrinvxYFga0=; b=WvI7RUAvjQiKN6ivchF5TXeKCI2QT4LKh8QzeQ2e+LTk1WaYeQsmXoPavFPZhcE0lE Ka1cYKM/UDVdcIMW5yfJh2w7mCJd/AG376q543zWBu9Hs1iKCZd/7zZQDlccVt3Uh0UI ZKGZwdLNEsDWek5tkImIiHn5eNu47D/WZghxWgebReWtJcEQl6ErhvCY84BWEPB8LwMe CxKJJSAMORgsmWldrNDdPINgEAUj0ZmG0SXIQyb6hienRZH8EGTcMrSa4da/wwv8zq3W ro7XcTg8hBFm+8cZ+DB0wTy5R+iSpUM6If+zDXLrqT6nPaEjoU4ebBczb0+KmVltWLrE WYKQ== X-Received: by 10.112.73.97 with SMTP id k1mr574899lbv.78.1418885843107; Wed, 17 Dec 2014 22:57:23 -0800 (PST) Original-Received: by 10.114.59.80 with HTTP; Wed, 17 Dec 2014 22:57:23 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22d 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:101651 Archived-At: 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 By the way, this problem is from the compile.el and when compilation-finish-functions is set, emacs 24.3.1 would give same error: Symbol's function definition is void: closure And 24.4.1 is OK. My problem is Why 24.3.1 returns this? How can I solve it on 24.3.1? Thanks, Zhongwei