From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rolf Ade Newsgroups: gmane.emacs.tangents Subject: Re: 2016-05-23 Emacs News Date: Fri, 10 Jun 2016 02:04:05 +0200 Organization: Me Message-ID: <87bn39ewp6.fsf@linux-qg7d.fritz.box> References: <87lh30iv18.fsf@sachachua.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1465517444 16879 80.91.229.3 (10 Jun 2016 00:10:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jun 2016 00:10:44 +0000 (UTC) To: emacs-tangents@gnu.org Original-X-From: emacs-tangents-bounces+get-emacs-tangents=m.gmane.org@gnu.org Fri Jun 10 02:10:37 2016 Return-path: Envelope-to: get-emacs-tangents@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 1bBA21-0005gi-83 for get-emacs-tangents@m.gmane.org; Fri, 10 Jun 2016 02:10:37 +0200 Original-Received: from localhost ([::1]:37687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBA20-0006ny-CJ for get-emacs-tangents@m.gmane.org; Thu, 09 Jun 2016 20:10:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBA1c-0006iW-3V for emacs-tangents@gnu.org; Thu, 09 Jun 2016 20:10:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBA1Y-0005pI-Rw for emacs-tangents@gnu.org; Thu, 09 Jun 2016 20:10:11 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:39350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBA1Y-0005lp-LA for emacs-tangents@gnu.org; Thu, 09 Jun 2016 20:10:08 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bBA1U-0005MK-FX for emacs-tangents@gnu.org; Fri, 10 Jun 2016 02:10:04 +0200 Original-Received: from p4ffbf80e.dip0.t-ipconnect.de ([79.251.248.14]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Jun 2016 02:10:04 +0200 Original-Received: from rolf by p4ffbf80e.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Jun 2016 02:10:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: p4ffbf80e.dip0.t-ipconnect.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:0cEhy2ZSs1TpIQ0qd6NLroR2HZg= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-tangents@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-tangents-bounces+get-emacs-tangents=m.gmane.org@gnu.org Original-Sender: "Emacs-tangents" Xref: news.gmane.org gmane.emacs.tangents:129 Archived-At: Sacha Chua writes: > 2016-05-23 Emacs News > > * Coding: > > * Literal values and destructive functions (That is: http://mbork.pl/2016-05-23_Literal_values_and_destructive_functions) Wait, what? Sure, sort is documented as modifying the LIST in place. And the setq makes `foo` global, so ... maybe no surprise, or so. But if I eval (defun destructive-havoc () "Example of destructive havoc." (let ((foo '(1 3 2))) (message "before sort, foo is: %s" foo) (sort foo #'<) (message "after sort, foo is: %s" foo))) and M-: (destructive-havoc) two times, I still get before sort, foo is: (1 3 2) after sort, foo is: (1 2 3) before sort, foo is: (1 2 3) after sort, foo is: (1 2 3) in *Messages*. Could someone please explain that to me?