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 13:01:46 +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 1490184194 780 195.159.176.226 (22 Mar 2017 12:03:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 22 Mar 2017 12:03:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 25929@debbugs.gnu.org, Nicolas Petton , Stefan Monnier , Tino Calancha To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 22 13:03:08 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 1cqeyn-0007m4-5x for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Mar 2017 13:03:05 +0100 Original-Received: from localhost ([::1]:50638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqeyt-0001Ga-5M for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Mar 2017 08:03:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqeyn-0001GT-8R for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 08:03:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqeyk-0004my-7c for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 08:03:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40528) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cqeyk-0004mr-4h for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 08:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cqeyj-0005LX-Qm for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 08:03:01 -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 12:03:01 +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.149018414520506 (code B ref 25929); Wed, 22 Mar 2017 12:03:01 +0000 Original-Received: (at 25929) by debbugs.gnu.org; 22 Mar 2017 12:02:25 +0000 Original-Received: from localhost ([127.0.0.1]:38727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqey9-0005Kg-B2 for submit@debbugs.gnu.org; Wed, 22 Mar 2017 08:02:25 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:51847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqey7-0005KY-Su for 25929@debbugs.gnu.org; Wed, 22 Mar 2017 08:02:24 -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 1cqexW-0001VZ-Ll; Wed, 22 Mar 2017 13:02:07 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEVHQUFlXlwSEBGxqaUr KCg5NTWwNAYgAAACeElEQVQ4jX2TQY8zJwyGTRbuuIT7Lp29h2/UOxnZd0+K//9f6custlpVbYkS gR/br20I7f++Ov0H2P8H9H9YyjfgH6byt30nLj+8895L/6HRv2F97n1lACRsGOsL/Pq976VchErp 3LlwWWHs5bF3+BcmBgXBwnnbrkDYmArSwGelLv0Ya3O5EXPgVcmVuX3sOCx7Jqacv7V3fuv7Y4GS KTslxJSl1P25kpa9B6ZHSiWgxrwqOD7wG8qeuVJG9BtaQdPc2ztDDMXnSumEcWXtjz23917K0h6R ql2lgeUO8CgcQmCDsobsjAISAXGGLJ1MB9Fgd8I6mifmFEIyIjnIkCR6rtzau3N2M1c1AGjXRBA6 2gaQzKLoHAeFO4DRn73qKVz9dBVPiHirqK+juSrW3qOIi0xXRFCngFpQyGiNEir0OcfEroeQMcxw vKCf4EmUKBIpO+oL1Y5ba58JZgx8AWJL1+doWLDiLtwnUrCR4zwvkC1TkrmhD1zUajzJ64rwCPMm rwUSeUguc4GUECmCPhCQ58hThWD/iNI2uAAkkCmGxvICN8XO1V4AIag+ZQt3ALRuajrniiBWyyK3 XwskhZgsEENksbjp/GOlwjBUFCq4KAqGwWmMrb0WgP1+NDI7TUaU+5I4PkZS+fTVkOmoI6xp4zSf Rojwhs7pnJPyOEfcWrNsJKrS0DlCpmZJ21ggOKnPly7gShjyow30fMqzqqMOj4R55yokc4i08TrZ YQh8ww0q1Vw/Ua9tesMd8/pGinhuyeYnhFTsN+KvdafheC2pYbj5Jekevv5P4U4q26ZySApVNNVw +VPpJO3AhTUZlqNebx92gL8AeVOzm8XarqMAAAAASUVORK5CYII= In-Reply-To: <878tnxa5l4.fsf@drachen> (Michael Heerdegen's message of "Wed, 22 Mar 2017 12:55:35 +0100") 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:130799 Archived-At: Michael Heerdegen writes: > That's a relatively small gain, and some people might prefer the > explicit form (2) for readability. If we don't do this, (map-delete foo 'bar) has surprising effects in this one corner case. That is, if foo is a hash table, then it's fine to say (map-delete foo 'bar). If you change foo to be an alist, you then have to transform all the calls to be (setq foo (map-delete foo 'bar)) instead, which kind of breaks the abstraction that map-delete tried to offer, I think? Making map-delete signal an error in the alist-where-bar-is-the-first-element sounds even worse to me, since the user may already be writing this stuff as (setq foo (map-delete foo 'bar)). (I think this was what Stefan suggested...) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no