From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 21 23:19:47 2023 Received: (at submit) by debbugs.gnu.org; 22 Mar 2023 03:19:47 +0000 Received: from localhost ([127.0.0.1]:33135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pep0t-0005IK-0E for submit@debbugs.gnu.org; Tue, 21 Mar 2023 23:19:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:47280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pep0q-0005IB-Ly for submit@debbugs.gnu.org; Tue, 21 Mar 2023 23:19:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pep0p-0004cF-By for bug-gnu-emacs@gnu.org; Tue, 21 Mar 2023 23:19:43 -0400 Received: from mout.web.de ([212.227.15.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pep0m-00066Z-TX for bug-gnu-emacs@gnu.org; Tue, 21 Mar 2023 23:19:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1679455179; i=michael_heerdegen@web.de; bh=QcGlHtWRrUCSv/OkAkaitqWEMxp3k47nho/YbxvQLDM=; h=X-UI-Sender-Class:From:To:Subject:Date; b=S4nFGV9XYUa3Nesp5/6z6KplppXN2cyPmhOVqjIM8W3RjhHC2elL8pvdJofqY7mwS G3cTNKu8weHZoDevU9Wjin14qAUKVW3ham7FNoZ/YnbZpDvxUr+LMe73taR30ZtY39 3Cyc+klBU/7P7QboZETDkXy/ISZS/GDc8A99j4maTVYXkJ520UanLI7DdmIdEIK72N KE6UhZYsUAUk71OLGG0n6zQSmHX7t+IDWZY45brwF/LXsPlJup4biy7MSnsPAAWan5 /qJagFWBO9+4ImtLQ5g4BPrtg/Z7lI2cDtRgn3Oi+EIrYOJQCRbGAWW3bgQKoAiMti UW1gqzVdYkYSA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([178.14.74.146]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MwA1A-1qWn4p1IQu-00s5Wl; Wed, 22 Mar 2023 04:19:39 +0100 From: Michael Heerdegen To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Doc: add-to-list: destructive? Date: Wed, 22 Mar 2023 04:19:38 +0100 Message-ID: <877cv9cw1h.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:jBSt0UQ1kWNpl4S4xFXG/DvL7uOiNrYvdwZcFAuNPyvQNBPm3iS A5OoD9NNCCdLhBbt4TVov8yqCfbHk9LdrpmgT/8m0Rpo+NbzhDFenRfcW7vjfk1M+9FlhNc aRcfE/8tWV2OKunaTKZLD7d5lECUPG3eWxsSIZ8q39YzeoP43sNxPuiu23Qbcwo52hxbgHA NyuUbTD85YpTYg3krhKaA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:5/HoF8vAUAc=;rYXBI8Zl+IHwNARgW+hIcZibErI IUOKVGeEdu0FG1hPTOUuUw9BDDceYMw7gliRUUpa1V9d4bYHgMgJa1m5umDFzxmz3pSedeU4A MTQNDBMAW3AeRdfkmT26UgcPlMhSNWITt/8/jcfvCroDaUgbnGVkps7TxzGgTSVGkvKpVLomm hvkrpQEirsM+1i3nyCbYLTvVqivgyVH5Y7A/OZ5/Dk8W64eq5Wl9dXi4IKsOJ66inTCXte3UB u4Y5KjuQDErnkujsqCxhD7eAMWFeITjOZyeXsUbjPPrFw4dKVbYqnAn2srdvSiKYKsYuwpjSA M6ytNFGGVKPG22ni9iCB/IbkM4Gc1J4uqZBTnPRgSDmB/DZUurWLecuSC53UYZl86TtxNUoSR vJATysw0BAXbxwXrDqYfZUaeNap2QOSZlV2knbaUvidgxiyCeDYLEPtUfs0pxErKkS+MxSnvU gJpZ1x7iZ/FOJ4EB6lHxjgDnnWGk8lvlAX2r5HNIQtIqVdvvPqiVVuQyeU7L2IfGAlmu8CJ7v a+r1QHD6CXspQm5FrItnkU4WT8SLfB43RrHN/gXV4GcbuXx5UVr0GzNUH5dIJFobWF+LkqDzw KeTVPQ/uvCiPKJ2zYP3+S69abbJtvKZzrDxPRUFzS0p+1+WOVyAPxInOVgYnfXZppTlM2XtJK 3g9s/v3vZUduM982/ONzIZtMngIfFVoudp9LNpkq65f3AaUeKKbyyC1zdn1zgxMfW7mfSfOOu xOOrlBKpbL8JZluD8B9MaF/4dYR90F9r4653SsgBVLAhp9GEbMmXj8CIuFb2/Qyr50HpH3/rR jYuGkGH5G830vuXL2/WE+8Ox3UfhMl9gFl7rTTFIUfNXkV44tSzEbmY+d74w0hh2xZFHtjCrG jIFsnM7lj1jFdbeuQo5jmdCWY2mWlYkHq8unzUIu3C6OFc/gYOeBZc3a3qvx38IhlHNLL1rCH tBUqbw== Received-SPF: pass client-ip=212.227.15.14; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hello, An example to demonstrate what I want to suggest: I use the following piece of code in my personal customization of Calc: #+begin_src emacs-lisp (when (eq calc-language 'latex) (add-to-list 'math-expr-opers (list "\\cdot" '* 191 190)))) #+end_src It is important that this code does not modify the list in `math-expr-opers' destructively because this list shares a sublist that is the value of a different variable I must avoid to change by side effect. AFAIK `add-to-list' is safe in that regard unless you specify the APPEND argument (where it suggests itself that the operation is destructive). So, can we add this simple detail to the docstring of `add-to-list': that this function doesn't modify the list that the LIST-VAR is bound to unless APPEND is non-nil? It would be strange if this would not be the case, still, I think it would be good to speak this out. TIA, Michael. In GNU Emacs 30.0.50 (build 27, x86_64-pc-linux-gnu, cairo version 1.16.0) of 2023-03-20 built on drachen Repository revision: aa54a24570e526b5438264caacf405a2370ba9d3 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux 11 (bullseye)