From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#25929: 25.2; map-delete doesn't delete permanently 1st alist elt Date: Wed, 22 Mar 2017 12:55:35 +0100 Message-ID: <878tnxa5l4.fsf@drachen> References: <87k288p2oq.fsf@gmail.com> <87k288kkqr.fsf@petton.fr> <87efyfluvi.fsf@petton.fr> <87efydlxfh.fsf@drachen> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1490183836 6850 195.159.176.226 (22 Mar 2017 11:57:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 22 Mar 2017 11:57:16 +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: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 22 12:57:10 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 1cqet3-0001EI-PT for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Mar 2017 12:57:09 +0100 Original-Received: from localhost ([::1]:50330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqet9-0007ky-Lx for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Mar 2017 07:57:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqet0-0007j7-Cm for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 07:57:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqesw-0002XG-7g for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 07:57:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40514) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cqesw-0002X1-3H for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 07:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cqesv-0005Ar-SC for bug-gnu-emacs@gnu.org; Wed, 22 Mar 2017 07:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Mar 2017 11:57: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.149018376419821 (code B ref 25929); Wed, 22 Mar 2017 11:57:01 +0000 Original-Received: (at 25929) by debbugs.gnu.org; 22 Mar 2017 11:56:04 +0000 Original-Received: from localhost ([127.0.0.1]:38712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqerv-000597-Cb for submit@debbugs.gnu.org; Wed, 22 Mar 2017 07:56:03 -0400 Original-Received: from mout.web.de ([212.227.15.3]:57691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqero-00058l-Mm for 25929@debbugs.gnu.org; Wed, 22 Mar 2017 07:55:57 -0400 Original-Received: from drachen.dragon ([92.208.182.212]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MBY4U-1czxz63WFS-00AUqy; Wed, 22 Mar 2017 12:55:34 +0100 In-Reply-To: (Lars Ingebrigtsen's message of "Tue, 21 Mar 2017 21:41:01 +0100") X-Provags-ID: V03:K0:Cc+9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lEm9fWq8D1uzY1 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:130798 Archived-At: Lars Ingebrigtsen writes: > If MAP isn't a symbol, then map-delete could avoid doing the setf, > couldn't it? > > I think that should make for a pretty useful form. You can both say > > ... > (map-delete foo 'bar) > ... > > and > > (setq foo (cons (map-delete (get-a-list) 'bar) 'zot)) > > and not be surprised at the results. It's certainly more fun than the >current (setq foo (delete 'bar foo)) we have all over the place, even >if it's something of a departure from how functions like this has >traditionally worked in various Lisps. So your suggestion is, with other words, that (1) (map-delete EXPR 'bar) is implicitly transformed into (2) (cl-callf map-delete EXPR 'bar) when EXPR is a valid place expression. That's a relatively small gain, and some people might prefer the explicit form (2) for readability. OTOH, without such magic, we can avoid making `map-delete' a macro. Personally I prefer this simpler approach. Regards, Michael.