From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal Date: Thu, 22 Jan 2015 01:53:33 -0800 Message-ID: <54C0C89D.6010305@dancol.org> References: <54C05269.7050602@dancol.org> <87oaprfa3t.fsf@fencepost.gnu.org> <87egqnf8lx.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mIwRFB6diLU7VmgDt5NccHvwIA749UN35" X-Trace: ger.gmane.org 1421920481 29597 80.91.229.3 (22 Jan 2015 09:54:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Jan 2015 09:54:41 +0000 (UTC) Cc: Oleh , "emacs-devel@gnu.org" To: David Kastrup , =?windows-1252?Q?Ren=E9_Kyllingstad?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 22 10:54:40 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YEETG-00051q-Le for ged-emacs-devel@m.gmane.org; Thu, 22 Jan 2015 10:54:38 +0100 Original-Received: from localhost ([::1]:52067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEETG-0000Am-8s for ged-emacs-devel@m.gmane.org; Thu, 22 Jan 2015 04:54:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEESL-0007KZ-Td for emacs-devel@gnu.org; Thu, 22 Jan 2015 04:53:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEESF-0004a1-Jp for emacs-devel@gnu.org; Thu, 22 Jan 2015 04:53:41 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:60300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEESF-0004Zv-Cl for emacs-devel@gnu.org; Thu, 22 Jan 2015 04:53:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=o/O61gBH6HfbFF2/TlJgsLhGOY0oiXox2HvTFDyA/Tk=; b=l6vEeLENu6XEH/x3U+5jczdr7tSWCQkUzmqUBwGRRku3rK3fUge7y0/WvPpTEiU8/LR4qjG5Gv3faZYk1rukOQJRcNCVRf7xenr9VOTJ3HcO5TADRD8uffPuyffEXSIJA8njKVywPjjzFOdqa427QKA4q6XhVAwXwEEISm1/zIzljN1sAyhGJS42R5kYSIJ2hti0WoUbwjRsn1t6Pw71G+JnO8NS813+X2uREEhHmSQNSL/ZDq37V2cCfC7AIRBY1GzCSPj1HWcGHDnr2VLcUPQEV3pexkCxLnwoYhXxm/HbSFrBu6gtbHv447bRXoiPmrcIqLytc8LuLfVkB8NjVw==; Original-Received: from [2601:8:b240:93::2b1] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1YEESE-000060-R9; Thu, 22 Jan 2015 01:53:34 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: <87egqnf8lx.fsf@fencepost.gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181573 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mIwRFB6diLU7VmgDt5NccHvwIA749UN35 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 01/22/2015 01:49 AM, David Kastrup wrote: > Ren=E9 Kyllingstad writes: >=20 >> On Thu, Jan 22, 2015 at 10:17 AM, David Kastrup wrote: >>> That does not mean that I am convinced we want or need short-lambda. >> >> Both C++ and Java have "recently" added a succinct syntax for their eq= uivalents. >> >> Given the amount of work it is to add features to either platform, >> quite a few people >> deemed it useful there. >> >> At least most peoples .emacs will look a bit tidier with a succinct >> anonymous lambda >> as an argument to add-hook :) >=20 > You are aware that using add-hook with ad-hoc functions is a bad idea > since it may mean that you add the same functionality several times in > case the add-hook is executed multiple times? I occasionally use defun for that: (add-hook 'some-hook (defun foo () (bar)) This way, no matter how many times we evaluate the form, we install only one function. It's usually clearer to just define the function out of line though. --mIwRFB6diLU7VmgDt5NccHvwIA749UN35 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJUwMidAAoJEN4WImmbpWBlgZIP/RBZ7Bx7BYqN8/98zLPmsqRq iifGSdtUGUcIZOZF8AKY+XnsxfWdrizfIjkGWc8J+1Qlir6BsNHeNQJa76JVEzH8 +ZmQlTcbUwkUBMTXCswlIM50JZ1TvmvmnUGOv2LqLWH3+q1psFThe7yMexvXpD9S g/F00ce2BhuGteEqG+5F7Iby8fhF/DMt/OEu8cPN1TQC3UAfWjccHJzEMBZVxsAy vOJgX2B5VK7V82mD9qaM1qb/2ZfxupGX+oNahkKQXRo0ByoFn7s9kKopuPVa9P7e 0pHavJ6ekO6qlfzNJHC4WgfZGMVdFMi8wkYG+YzxUvtEevb2PfRmb93ZfYTodDPW Hb5/9gKO2YBsY8jw2e8QmfgpC8R/C3ibN1QSeFjKQH0cRVUs2mNs6xpMgnXeac/3 V8OhsZTpfMjzmXmcdLVqnYr5Yt1VcukUc0QI7xX20lPWRgHdb0S/NwhAcrMKh2FJ naPKSKLMuADBSRb95G3S4YCg45op+ANGxxJ6xgAPpQshgrw4LGLTsxidUtIG+z9/ xCArrw3eC3njm/ZiaHKbqbx0a3zh/wdYU+dsMsO2gQeUqcjLmuAh02Pz1sMb2W7P X99dL7r/imCYNj+Ze53TSLyvqFDUm27nNAQ0DFx9GERpcSHB2K5OKACtTH7fk1A1 Klt4sbUZ+DcpaGucjnUG =JXpc -----END PGP SIGNATURE----- --mIwRFB6diLU7VmgDt5NccHvwIA749UN35--