From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Petton Newsgroups: gmane.emacs.devel Subject: Re: Using gv in map and seq? Date: Tue, 16 Jun 2015 09:13:03 +0200 Message-ID: <87eglcjfcw.fsf@petton.fr> References: <87egldxn7p.fsf@petton.fr> <878ublkrqe.fsf@petton.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1434438820 14246 80.91.229.3 (16 Jun 2015 07:13:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Jun 2015 07:13:40 +0000 (UTC) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 16 09:13:30 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 1Z4l3o-0005lo-W3 for ged-emacs-devel@m.gmane.org; Tue, 16 Jun 2015 09:13:29 +0200 Original-Received: from localhost ([::1]:38264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4l3o-0004JE-DY for ged-emacs-devel@m.gmane.org; Tue, 16 Jun 2015 03:13:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4l3a-0004J8-4x for emacs-devel@gnu.org; Tue, 16 Jun 2015 03:13:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4l3V-0001Wg-7p for emacs-devel@gnu.org; Tue, 16 Jun 2015 03:13:14 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:60942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4l3V-0001WN-1g for emacs-devel@gnu.org; Tue, 16 Jun 2015 03:13:09 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A1E2720659 for ; Tue, 16 Jun 2015 03:13:08 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 16 Jun 2015 03:13:08 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=kHbHcPC5o3vlSjWT0TpIShTOz94=; b=nqPdi I+FKP/gJ4IvxEt2+cmteFkULggnnXG9uFsB2nGjpPIYDIs7paptzSBqduA0SVRZk QvBXK+KvgrwXUqyqkcfHF3iz3ba08R5SYfidsl/NGdXLrvF6zYKwr2GhrmB79Ymp FJdiPwOfRgEIV6LsX4SWDxOJcoHNyXD0RXx7qE= X-Sasl-enc: D35QoyzWnou90a3U59d6dRcRANZ2Stat3/J6bfU5vbKF 1434438788 Original-Received: from blueberry (unknown [31.211.216.84]) by mail.messagingengine.com (Postfix) with ESMTPA id E54E968014A; Tue, 16 Jun 2015 03:13:07 -0400 (EDT) In-Reply-To: User-Agent: Notmuch/0.19 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-redhat-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.29 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:187206 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Stefan Monnier writes: >> Something like the patch below seems to work (and it generalizes >> map-put to accept for MAP not only symbols but any "lvalue"). It also >> tightens the code generated by map--dispatch. > > BTW, just like `map-put', it suffers from the major problem that it > hardcodes in the macroexpanded code (i.e. in the .elc files of Elisp > packages that use map-put) the current definition of map--dispatch and > the current 3 supported map types. Indeed, I never though about this issue! > So we should introduce a helper function (call it map--put) and move > most of the setter's code there (including the dispatch). Yes, I can do that. =2D-=20 Nicolas Petton http://nicolas-petton.fr --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQEcBAEBAgAGBQJVf8x/AAoJECM1h6R8IHkQdwQH/3X34YpUJ5wX8ABVe6ZY6bBo S7em2DiqTjkNuDrSdabaBrIe3cm+axr5CnOyWicP1B38BZaB88NcSdPRkrerKn6+ 0DG18vd9GpZ4wMahLFNEimuzJ07Nd60/FLn58MoGlZKuuIcvfAEEV3gkJVtbwQTu +Q9XhbJnTzAcV0YT5mH4UqM6/V2RZK/i65L2y5pbozgG5UXrI5TPSPSX5ZUy6xR8 MK7irpgfjg582RBT0kE6CBpUslmVRQyjzQnEhlCaP4mtNdADeAX+GufobXwxSBCk ds+76sMJny/wDPmjinp7AJNtX1q0Xfktys1bBeIkYSwVhV4lsNKfLiDOAMs1QAo= =HEnI -----END PGP SIGNATURE----- --=-=-=--