From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Using gv in map and seq? Date: Mon, 15 Jun 2015 21:45:52 -0400 Message-ID: References: <87egldxn7p.fsf@petton.fr> <878ublkrqe.fsf@petton.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1434419174 24634 80.91.229.3 (16 Jun 2015 01:46:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Jun 2015 01:46:14 +0000 (UTC) Cc: emacs-devel To: Nicolas Petton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 16 03:46:05 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 1Z4fwz-0008ND-0H for ged-emacs-devel@m.gmane.org; Tue, 16 Jun 2015 03:46:05 +0200 Original-Received: from localhost ([::1]:37138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4fwx-0002l6-TD for ged-emacs-devel@m.gmane.org; Mon, 15 Jun 2015 21:46:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4fwu-0002l0-Ow for emacs-devel@gnu.org; Mon, 15 Jun 2015 21:46:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4fwp-0006fl-N3 for emacs-devel@gnu.org; Mon, 15 Jun 2015 21:46:00 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:12732) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4fwp-0006cS-Ek for emacs-devel@gnu.org; Mon, 15 Jun 2015 21:45:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DaFgA731xV/1enxEVcgxCEAoVVwgOBCAQCAoE8PBEBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEHAgEfizqFBQeELQWzP4FFI4QUIoJ4AQEB X-IPAS-Result: A0DaFgA731xV/1enxEVcgxCEAoVVwgOBCAQCAoE8PBEBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEHAgEfizqFBQeELQWzP4FFI4QUIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="126588445" Original-Received: from 69-196-167-87.dsl.teksavvy.com (HELO ceviche.home) ([69.196.167.87]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 15 Jun 2015 21:45:52 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 0762066166; Mon, 15 Jun 2015 21:45:52 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Mon, 15 Jun 2015 12:30:03 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:187204 Archived-At: > 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. So we should introduce a helper function (call it map--put) and move most of the setter's code there (including the dispatch). Stefan