From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#25929: 25.2; map-delete doesn't delete permanently 1st alist elt Date: Wed, 22 Mar 2017 18:23:03 +0100 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 1490203459 21087 195.159.176.226 (22 Mar 2017 17:24:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 22 Mar 2017 17:24:19 +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: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 22 18:24:14 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 1cqjzV-0004hP-KT for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Mar 2017 18:24:09 +0100 Original-Received: from localhost ([::1]:52442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqjzb-0002bq-JH for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Mar 2017 13:24:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqjzT-0002Z7-Aq for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 13:24:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqjzO-0001mt-FE for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 13:24:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41495) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cqjzO-0001ml-Bh for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 13:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cqjzO-0006Xr-5z for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 13:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Mar 2017 17:24: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.149020339425099 (code B ref 25929); Wed, 22 Mar 2017 17:24:02 +0000 Original-Received: (at 25929) by debbugs.gnu.org; 22 Mar 2017 17:23:14 +0000 Original-Received: from localhost ([127.0.0.1]:39694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqjyb-0006Wl-TC for submit@debbugs.gnu.org; Wed, 22 Mar 2017 13:23:14 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:52319) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqjya-0006Wc-Dj for 25929@debbugs.gnu.org; Wed, 22 Mar 2017 13:23:12 -0400 Original-Received: from cm-84.213.17.174.getinternet.no ([84.213.17.174] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cqjyR-0005fo-Cn; Wed, 22 Mar 2017 18:23:05 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAADFBMVEVlRzFZNyNCJBaDb1+r l/OYAAACZklEQVQokR3J7U8SAQDH8d/BwfRycZBnyFrLB5ialUgPW7N4umPJartjHAHrhTpgQi9K /4HUSZubm+iEhq/ACQvWi3rXyzMsV5nU2loPa1m+aL0Kc65WVxf1fffZF0BVrfxPfgB66DJkd6UO yQ/Wz7FOkrbbpD4Coxcowkqj80PfQyeSTj9opqkqEUwKTkbQI+0Ykkk9iSARbH4xpfTW3KQaX9l2 w94NSV2tjXXhjoHhnl+p6ey/5RTOzT5qjNb22QY0Di3U7PjQrQ17cq0t6kWFlfl+rKuZSJrAIZXA Vyc3rZ3aQgOqs5caHbrdH1Rr2oBtvlNcqW3/ehU2A7sm+nTC3dHxxhICJDIUTRzpUo2FUhNQDs6M Fg1Hm6iMSGJvMcv1TB24SBXSPKQvKl90UrVmEj0puF9vBbXssc1ydCGC3NVe5zVF+RPPrgSwq6wS dey0FpeW8XMjSevqZySbXsL5GZhO1NEdM5Ug3+dV/464kA9A0rX55hTlyW29R8QpR56drowXS/EA i29GSW8UhPlit0VEP7vqD9D5pNAdyEC2cYLR4BwsipkMqroczwgd3nKiNAj7U7M/QpuHs2mvB/i+ TpIMy4U5vwnE3F1xosU3n0hmyqAWNA7K1e73ZJkWyNZmkjGd0Q+LKxnUTlqJj2wDFbFko7C940Ik Kg8K4lIMgxvXef/hZ6646FvGZ8Xsah7Q7M9ESzm8rMasVKqPzecKU8BjAzutySdz8bATtrPv+aAx Hg+3JPpxvOkTSVNUMTza40LOUaIc2nw2liBvYuTeDseaE96QuPgWgdqW4Gkr92TiIctfYMPqo9Yw +ZUAAAAASUVORK5CYII= In-Reply-To: (Stefan Monnier's message of "Wed, 22 Mar 2017 13:04:32 -0400") 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:130815 Archived-At: Stefan Monnier writes: > 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))) And then having map-delete-1 be the thing to support user-defined types? It'd be kinda an even more unusual Lisp construct, but, on the other hand, I don't think Lisp has ever come up with an elegant way to express these mutating functions before, so we're free to innovate. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no