From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#25929: 25.2; map-delete doesn't delete permanently 1st alist elt Date: Wed, 22 Mar 2017 16:31:26 -0400 Message-ID: References: <87k288p2oq.fsf@gmail.com> <87k288kkqr.fsf@petton.fr> <87efyfluvi.fsf@petton.fr> <87efydlxfh.fsf@drachen> <878tnxa5l4.fsf@drachen> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1490214783 22009 195.159.176.226 (22 Mar 2017 20:33:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 22 Mar 2017 20:33:03 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Michael Heerdegen , 25929@debbugs.gnu.org, Nicolas Petton , Noam Postavsky , Tino Calancha To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 22 21:32:58 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqmwB-0004jm-AS for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Mar 2017 21:32:55 +0100 Original-Received: from localhost ([::1]:53186 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqmwF-0001H2-NF for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Mar 2017 16:32:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqmvP-0000gF-0w for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 16:32:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqmvL-0004Kt-2K for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 16:32:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41591) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cqmvK-0004Kn-Uz for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 16:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cqmvK-0002Vj-Kk for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 16:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Mar 2017 20:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25929 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25929-submit@debbugs.gnu.org id=B25929.14902146919616 (code B ref 25929); Wed, 22 Mar 2017 20:32:02 +0000 Original-Received: (at 25929) by debbugs.gnu.org; 22 Mar 2017 20:31:31 +0000 Original-Received: from localhost ([127.0.0.1]:39789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqmup-0002V1-Mf for submit@debbugs.gnu.org; Wed, 22 Mar 2017 16:31:31 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:46688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqmun-0002Ut-HQ for 25929@debbugs.gnu.org; Wed, 22 Mar 2017 16:31:30 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v2MKVQYX027301; Wed, 22 Mar 2017 16:31:27 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 8026561AB9; Wed, 22 Mar 2017 16:31:26 -0400 (EDT) In-Reply-To: (Lars Ingebrigtsen's message of "Wed, 22 Mar 2017 18:23:03 +0100") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV5979=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5979> : inlines <5754> : streams <1738088> : uri <2396882> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130824 Archived-At: >> The problem is how to make it extensible to user-defined types >> via something like cl-generic.el (e.g. add support for avl-tree.el >> without having to make map.el aware of avl-tree.el). > Hm... I haven't used cl-generic.el, but having map-delete be something > like this work? > (defmacro map-delete (map elem) > (if (symbolp map) > `(setq ,map (map-delete-1 ,map ,elem)) > `(map-delete-1 ,map ,elem))) It would work, yes. I think the resulting semantics is pretty ugly, but it's just a question of taste. Stefan