From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 02:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 5971@debbugs.gnu.org X-Debbugs-Original-To: Received: via spool by submit@debbugs.gnu.org id=B.12716449446775 (code B ref -1); Mon, 19 Apr 2010 02:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Apr 2010 02:42:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3gwJ-0001lE-6J for submit@debbugs.gnu.org; Sun, 18 Apr 2010 22:42:24 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3gwH-0001l7-Ft for submit@debbugs.gnu.org; Sun, 18 Apr 2010 22:42:22 -0400 Received: from lists.gnu.org ([199.232.76.165]:53075) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O3gwD-0003BU-SR for submit@debbugs.gnu.org; Sun, 18 Apr 2010 22:42:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3gwD-0000Me-5I for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2010 22:42:17 -0400 Received: from [140.186.70.92] (port=49829 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3gw7-0000LB-Ar for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2010 22:42:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3gw5-0001LU-QK for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2010 22:42:11 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:21748) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3gw5-0001LD-Fx for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2010 22:42:09 -0400 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3J2g6Zl022745 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 19 Apr 2010 02:42:07 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3J2g5CC001341 for ; Mon, 19 Apr 2010 02:42:05 GMT Received: from abhmt015.oracle.com by acsmt353.oracle.com with ESMTP id 185978971271644859; Sun, 18 Apr 2010 19:40:59 -0700 Received: from dradamslap1 (/10.175.221.180) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 18 Apr 2010 19:40:59 -0700 From: "Drew Adams" Date: Sun, 18 Apr 2010 19:41:18 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: Acrfacn4Xs0SMElmRkeadRaW94Eijg== X-Auth-Type: Internal IP X-Source-IP: rcsinet13.oracle.com [148.87.113.125] X-CT-RefId: str=0001.0A090203.4BCBC2FF.02CC:SCFMA4539811,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.4 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Visit this file, without loading it: http://www.emacswiki.org/emacs/wide-n.el Change this line: (setq wide-n-restrictions (remove (cons mrk1 mrk2) wide-n-restrictions)) To this: (setq wide-n-restrictions (delete (cons mrk1 mrk2) wide-n-restrictions)) Then load the file (with `delete'). Then: In some buffer X, do `C-x n n', then `C-x n x'. Check the value of variable `wide-n-restrictions'. In another buffer Y, just check the value of the variable. You will see that the default value, which should be `(all)', has been changed to be what the new value is for buffer X. Try the same thing again (starting from scratch), but using `remove' (the original code) instead of `delete'. There is no problem now: only the buffer-local value is ever set. This doesn't seem right to me. In GNU Emacs 23.1.95.1 (i386-mingw-nt5.1.2600) of 2010-04-03 on G41R2F1 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/imagesupport/include' From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 04:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Drew Adams" Cc: 5971@debbugs.gnu.org Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.12716510189111 (code B ref 5971); Mon, 19 Apr 2010 04:24:01 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 04:23:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3iWI-0002Mu-K7 for submit@debbugs.gnu.org; Mon, 19 Apr 2010 00:23:38 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3iWF-0002Mp-Sz for 5971@debbugs.gnu.org; Mon, 19 Apr 2010 00:23:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAIJ3y0vO+LLb/2dsb2JhbACbdHK6E4UQBItr X-IronPort-AV: E=Sophos;i="4.52,234,1270440000"; d="scan'208";a="61136881" Received: from 206-248-178-219.dsl.teksavvy.com (HELO ceviche.home) ([206.248.178.219]) by ironport2-out.pppoe.ca with ESMTP; 19 Apr 2010 00:23:31 -0400 Received: by ceviche.home (Postfix, from userid 20848) id AC2E0660D2; Mon, 19 Apr 2010 00:23:31 -0400 (EDT) From: Stefan Monnier Message-ID: References: Date: Mon, 19 Apr 2010 00:23:31 -0400 In-Reply-To: (Drew Adams's message of "Sun, 18 Apr 2010 19:41:18 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -1.8 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.8 (-) > This doesn't seem right to me. Why not? That's the whole reason for the existence of two functions: `delete' and `remove'. Stefan From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 05:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "'Stefan Monnier'" Cc: 5971@debbugs.gnu.org Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.127165474810690 (code B ref 5971); Mon, 19 Apr 2010 05:26:02 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 05:25:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3jUS-0002mN-Jh for submit@debbugs.gnu.org; Mon, 19 Apr 2010 01:25:48 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3jUQ-0002mF-3X for 5971@debbugs.gnu.org; Mon, 19 Apr 2010 01:25:46 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3J5Pd97007929 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Apr 2010 05:25:41 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3IMRimK001314; Mon, 19 Apr 2010 05:25:37 GMT Received: from abhmt013.oracle.com by acsmt354.oracle.com with ESMTP id 186218161271654663; Sun, 18 Apr 2010 22:24:23 -0700 Received: from dradamslap1 (/10.175.221.180) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 18 Apr 2010 22:24:23 -0700 From: "Drew Adams" References: Date: Sun, 18 Apr 2010 22:24:42 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: AcrfeBQdPzUaaE56S+ekQTs2QIONHwAB37sw In-Reply-To: X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090209.4BCBE956.0066:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -4.4 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) > > This doesn't seem right to me. > > Why not? That's the whole reason for the existence of two functions: > `delete' and `remove'. I'm aware that `delete' modifies the list structure and `remove' uses a copy. What I don't understand is the interaction with a default value instead of a buffer-local value. Why would `delete' cause the behavior described? The same code BTW uses `nconc' apparently without causing such modify-the-default-value behavior: (setq wide-n-restrictions (nconc (nthcdr arg wide-n-restrictions) latest)) What is the relation between `delete's modification of the list structure of a cons that is a buffer-local value of a variable and its (apparent) modification of the default value of the variable? From unknown Sun Jun 22 08:08:10 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "Drew Adams" Subject: bug#5971 closed by Stefan Monnier (Re: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value) Message-ID: References: X-Gnu-PR-Message: they-closed 5971 X-Gnu-PR-Package: emacs Reply-To: 5971@debbugs.gnu.org Date: Mon, 19 Apr 2010 07:29:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1271662142-16317-1" This is a multi-part message in MIME format... ------------=_1271662142-16317-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #5971: 23.1.95; `delete' modifies default value instead of buffer-local val= ue It has been closed by Stefan Monnier . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Stefan Monnier by replying to this email. --=20 5971: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D5971 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1271662142-16317-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 5971-done) by debbugs.gnu.org; 19 Apr 2010 07:28:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3lOo-0004Et-0N for submit@debbugs.gnu.org; Mon, 19 Apr 2010 03:28:06 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3kPq-0003IS-6G for 5971-done@debbugs.gnu.org; Mon, 19 Apr 2010 02:25:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAKOTy0vO+LLb/2dsb2JhbACbdHK5RoUQBItr X-IronPort-AV: E=Sophos;i="4.52,234,1270440000"; d="scan'208";a="61139718" Received: from 206-248-178-219.dsl.teksavvy.com (HELO ceviche.home) ([206.248.178.219]) by ironport2-out.pppoe.ca with ESMTP; 19 Apr 2010 02:25:02 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 2A00E660D2; Mon, 19 Apr 2010 02:25:02 -0400 (EDT) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Message-ID: References: Date: Mon, 19 Apr 2010 02:25:02 -0400 In-Reply-To: (Drew Adams's message of "Sun, 18 Apr 2010 22:24:42 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 5971-done X-Mailman-Approved-At: Mon, 19 Apr 2010 03:28:04 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.8 (-) >> > This doesn't seem right to me. >> Why not? That's the whole reason for the existence of two functions: >> `delete' and `remove'. > I'm aware that `delete' modifies the list structure and `remove' uses > a copy. What I don't understand is the interaction with a default > value instead of a buffer-local value. Why would `delete' cause the > behavior described? Why not? Stefan PS: Closing this. You can continue the discussion on gnu.emacs.help (or even comp.lang.lisp, tho I never read that one and they're probably not that familiar with buffer-local variables). ------------=_1271662142-16317-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Apr 2010 02:42:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3gwJ-0001lE-6J for submit@debbugs.gnu.org; Sun, 18 Apr 2010 22:42:24 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3gwH-0001l7-Ft for submit@debbugs.gnu.org; Sun, 18 Apr 2010 22:42:22 -0400 Received: from lists.gnu.org ([199.232.76.165]:53075) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O3gwD-0003BU-SR for submit@debbugs.gnu.org; Sun, 18 Apr 2010 22:42:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3gwD-0000Me-5I for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2010 22:42:17 -0400 Received: from [140.186.70.92] (port=49829 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3gw7-0000LB-Ar for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2010 22:42:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3gw5-0001LU-QK for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2010 22:42:11 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:21748) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3gw5-0001LD-Fx for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2010 22:42:09 -0400 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3J2g6Zl022745 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 19 Apr 2010 02:42:07 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3J2g5CC001341 for ; Mon, 19 Apr 2010 02:42:05 GMT Received: from abhmt015.oracle.com by acsmt353.oracle.com with ESMTP id 185978971271644859; Sun, 18 Apr 2010 19:40:59 -0700 Received: from dradamslap1 (/10.175.221.180) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 18 Apr 2010 19:40:59 -0700 From: "Drew Adams" To: Subject: 23.1.95; `delete' modifies default value instead of buffer-local value Date: Sun, 18 Apr 2010 19:41:18 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: Acrfacn4Xs0SMElmRkeadRaW94Eijg== X-Auth-Type: Internal IP X-Source-IP: rcsinet13.oracle.com [148.87.113.125] X-CT-RefId: str=0001.0A090203.4BCBC2FF.02CC:SCFMA4539811,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Visit this file, without loading it: http://www.emacswiki.org/emacs/wide-n.el Change this line: (setq wide-n-restrictions (remove (cons mrk1 mrk2) wide-n-restrictions)) To this: (setq wide-n-restrictions (delete (cons mrk1 mrk2) wide-n-restrictions)) Then load the file (with `delete'). Then: In some buffer X, do `C-x n n', then `C-x n x'. Check the value of variable `wide-n-restrictions'. In another buffer Y, just check the value of the variable. You will see that the default value, which should be `(all)', has been changed to be what the new value is for buffer X. Try the same thing again (starting from scratch), but using `remove' (the original code) instead of `delete'. There is no problem now: only the buffer-local value is ever set. This doesn't seem right to me. In GNU Emacs 23.1.95.1 (i386-mingw-nt5.1.2600) of 2010-04-03 on G41R2F1 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/imagesupport/include' ------------=_1271662142-16317-1-- From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: - reopen Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 15:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: <5971@debbugs.gnu.org>, Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.127168980630339 (code B ref 5971); Mon, 19 Apr 2010 15:11:02 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 15:10:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3sbt-0007tI-8M for submit@debbugs.gnu.org; Mon, 19 Apr 2010 11:10:05 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3sbr-0007sg-1Y; Mon, 19 Apr 2010 11:10:03 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3JF9t6r030167 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Apr 2010 15:09:56 GMT Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3J5e0HW019842; Mon, 19 Apr 2010 15:09:54 GMT Received: from abhmt005.oracle.com by acsmt355.oracle.com with ESMTP id 187827401271689787; Mon, 19 Apr 2010 08:09:47 -0700 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Apr 2010 08:09:45 -0700 From: "Drew Adams" References: Date: Mon, 19 Apr 2010 08:09:44 -0700 Message-ID: <0696CCE78ED644FA89A6FF1BB19C8A83@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: AcrfeBQdPzUaaE56S+ekQTs2QIONHwAB37swABO5dVA= X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090201.4BCC7245.005B:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -4.4 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) reopen 5971 thanks From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 15:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "'Stefan Monnier'" , <5971@debbugs.gnu.org> Cc: tracker@debbugs.gnu.org, 'GNU bug Tracking System' Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.127168980830347 (code B ref 5971); Mon, 19 Apr 2010 15:11:02 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 15:10:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3sbv-0007tQ-GZ for submit@debbugs.gnu.org; Mon, 19 Apr 2010 11:10:08 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3sbr-0007sh-UH; Mon, 19 Apr 2010 11:10:04 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3JF9uw6030199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Apr 2010 15:09:57 GMT Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3INOYZQ007021; Mon, 19 Apr 2010 15:09:54 GMT Received: from abhmt005.oracle.com by acsmt355.oracle.com with ESMTP id 187827081271689784; Mon, 19 Apr 2010 08:09:44 -0700 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Apr 2010 08:09:43 -0700 From: "Drew Adams" References: Date: Mon, 19 Apr 2010 08:09:38 -0700 Message-ID: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: AcrfiQyyUlHWC+3rTaGsM/ayLy7hAgARZ1GQ X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090206.4BCC7246.0120:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -3.4 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) > -----Original Message----- > From: Stefan Monnier [mailto:monnier@iro.umontreal.ca] > Sent: Sunday, April 18, 2010 11:25 PM > To: Drew Adams > Subject: Re: bug#5971: 23.1.95; `delete' modifies default > value instead of buffer-local value > > >> > This doesn't seem right to me. > >> > >> Why not? That's the whole reason for the existence of two > >> functions: `delete' and `remove'. > > > > I'm aware that `delete' modifies the list structure and > > `remove' uses a copy. What I don't understand is the > > interaction with a default value instead of a buffer-local > > value. Why would `delete' cause the behavior described? > > Why not? Why? (You're not helping, just being evasive.) Why should modification of a buffer-local value also modify the default value? If this is not a product bug, it is at least a doc bug. I can find nothing in the doc that mentions such behavior or would help one to expect it or understand it. There is no explanation of any dependency between a default value and buffer-local values, in the sense manifested. The only explanation about buffer-local vars states that if a buffer-local value is not yet set then the default value is used instead. That does not explain why modification of a buffer-local value would affect also the default value. The way the doc presents it, the two are conceptually separate, including in terms of modification. There is nothing that I can see that would lead one to expect that modification of a particular buffer-local value would affect also the default value. This needs to be documented. It is apparently an important way in which a buffer-local value is, well, not buffer-local. In the doc there are caveats about things like `let'-binding, but nothing is said about this (arguably more serious or at least just as surprising) bizarreness (er, design property). Buffer-local variables are specific to Emacs Lisp (and other Lisps that have a notion of editor buffers). Other, general Lisps do not have any notion of buffer-local variables, so users of such Lisps who come to Emacs Lisp will not have an understanding of this either. The Emacs Lisp doc needs to cover this specific difference completely. > PS: Closing this. Please reopen it - at least as a doc bug. > You can continue the discussion on gnu.emacs.help > (or even comp.lang.lisp, tho I never read that one and > they're probably not that familiar with buffer-local variables). Precisely. Which is why this particular knot about buffer-local variables needs to be documented in the Elisp manual. It is not, AFAICT. From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 15:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 5971@debbugs.gnu.org Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.12716925841123 (code B ref 5971); Mon, 19 Apr 2010 15:57:02 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 15:56:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3tKi-0000I3-8o for submit@debbugs.gnu.org; Mon, 19 Apr 2010 11:56:24 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3tKg-0000Hy-6i for 5971@debbugs.gnu.org; Mon, 19 Apr 2010 11:56:22 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1O3tKb-0006hp-7B; Mon, 19 Apr 2010 11:56:17 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19404.32033.19046.334382@fencepost.gnu.org> Date: Mon, 19 Apr 2010 11:56:17 -0400 From: Glenn Morris In-Reply-To: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com> References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com> X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: magenta X-Ran: JKp[+J=\ci(}MVp List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) Please don't post to 3 different mailing lists. You should never post to tracker@debbugs. You should post to help-debbugs@gnu only to discuss the bug tracking system. Also, messages that are pure control messages should go to control@debbugs only, not to the individual bug address as well. If you have problems with this, help-debbugs is the place to discuss such things. Drew Adams wrote: > To: "'Stefan Monnier'" , <5971@debbugs.gnu.org> > Cc: tracker@debbugs.gnu.org, 'GNU bug Tracking System' From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: Andreas Schwab Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 16:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Drew Adams" Cc: 5971@debbugs.gnu.org, tracker@debbugs.gnu.org, 'Stefan Monnier' , 'GNU bug Tracking System' Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.12716931611423 (code B ref 5971); Mon, 19 Apr 2010 16:06:01 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 16:06:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3tU1-0000Ms-0Q for submit@debbugs.gnu.org; Mon, 19 Apr 2010 12:06:01 -0400 Received: from mail-out.m-online.net ([212.18.0.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3tTy-0000Mi-SN; Mon, 19 Apr 2010 12:05:59 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 98E8A1C00069; Mon, 19 Apr 2010 18:05:53 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 3D44B903B5; Mon, 19 Apr 2010 18:05:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id F6JHXjZyCcis; Mon, 19 Apr 2010 18:05:52 +0200 (CEST) Received: from igel.home (ppp-88-217-100-218.dynamic.mnet-online.de [88.217.100.218]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 19 Apr 2010 18:05:52 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id ED24CCA297; Mon, 19 Apr 2010 18:05:51 +0200 (CEST) From: Andreas Schwab References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com> X-Yow: I own seven-eighths of all the artists in downtown Burbank! Date: Mon, 19 Apr 2010 18:05:51 +0200 In-Reply-To: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com> (Drew Adams's message of "Mon, 19 Apr 2010 08:09:38 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -1.8 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) "Drew Adams" writes: > Why? (You're not helping, just being evasive.) Why should modification of a > buffer-local value also modify the default value? delete works by side effect. If you don't want this use remove. > If this is not a product bug, it is at least a doc bug. Delete by side effect any occurrences of ELT as a member of SEQ. ^^^^^^^^^^^ Pretty clear description. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 16:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "'Andreas Schwab'" Cc: 5971@debbugs.gnu.org, tracker@debbugs.gnu.org, 'Stefan Monnier' , 'GNU bug Tracking System' Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.12716938221747 (code B ref 5971); Mon, 19 Apr 2010 16:17:02 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 16:17:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3tef-0000S2-M2 for submit@debbugs.gnu.org; Mon, 19 Apr 2010 12:17:01 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3ted-0000Ro-0r; Mon, 19 Apr 2010 12:16:59 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3JGGoMu010696 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Apr 2010 16:16:51 GMT Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3JGGkqB021244; Mon, 19 Apr 2010 16:16:47 GMT Received: from abhmt006.oracle.com by acsmt354.oracle.com with ESMTP id 188059381271693747; Mon, 19 Apr 2010 09:15:47 -0700 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Apr 2010 09:15:46 -0700 From: "Drew Adams" References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com> Date: Mon, 19 Apr 2010 09:15:46 -0700 Message-ID: <8348D62071EB468F8FD5D95D35201C08@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: Acrf2jPl20lrE21CRKidhs0UrqukzgAAEYbQ X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090201.4BCC81F5.004A:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -4.3 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) > > Why? (You're not helping, just being evasive.) Why should > > modification of a buffer-local value also modify the default value? > > delete works by side effect. If you don't want this use remove. > > > If this is not a product bug, it is at least a doc bug. > > Delete by side effect any occurrences of ELT as a member of SEQ. > ^^^^^^^^^^^ > Pretty clear description. I'm well aware that `delete' deletes by side effect. Please read the thread and that will be quite clear. What's not clear is that a side effect on a buffer-local value should affect the default value. Nothing in the doc states that they share list structure. Apparently they do. This relation between the two needs to be documented. From reading the doc there is nothing that would lead you to expect that setting the buffer-local value would ever change the default value. The doc presents the two values (buffer-local and default) as being separate. The only relation described between the two is that if the buffer-local value is not set then the default value is used for the variable. In this case, the buffer-local value is not set in buffer Y, so it uses the default value. What's not clear is why setting the buffer-local value in buffer X changed the default value (so it was used in buffer Y, where the b-l value was not set). From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: Andreas Schwab Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 16:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Drew Adams" Cc: 5971@debbugs.gnu.org, tracker@debbugs.gnu.org, 'Stefan Monnier' , 'GNU bug Tracking System' Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.12716947273128 (code B ref 5971); Mon, 19 Apr 2010 16:33:02 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 16:32:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3ttH-0000oP-5q for submit@debbugs.gnu.org; Mon, 19 Apr 2010 12:32:07 -0400 Received: from mail-out.m-online.net ([212.18.0.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3ttD-0000nu-Oo; Mon, 19 Apr 2010 12:32:05 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 922021C154A7; Mon, 19 Apr 2010 18:31:58 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 49E6690309; Mon, 19 Apr 2010 18:31:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id IbeGMibWjCNY; Mon, 19 Apr 2010 18:31:54 +0200 (CEST) Received: from igel.home (ppp-88-217-100-218.dynamic.mnet-online.de [88.217.100.218]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 19 Apr 2010 18:31:54 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id D90C2CA297; Mon, 19 Apr 2010 18:31:53 +0200 (CEST) From: Andreas Schwab References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com> <8348D62071EB468F8FD5D95D35201C08@us.oracle.com> X-Yow: I can't think about that. It doesn't go with HEDGES in the shape of LITTLE LULU -- or ROBOTS making BRICKS... Date: Mon, 19 Apr 2010 18:31:53 +0200 In-Reply-To: <8348D62071EB468F8FD5D95D35201C08@us.oracle.com> (Drew Adams's message of "Mon, 19 Apr 2010 09:15:46 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) "Drew Adams" writes: > Nothing in the doc states that they share list structure. There is no buffer-local value before you set it. The doc is pretty clear that a buffer-local value only starts to exist the first time it is set: Make VARIABLE become buffer-local whenever it is set. At any time, the value for the current buffer is in effect, unless the variable has never been set in this buffer, in which case the default value is in effect. ^^^^^^^^^^^^^^^^^^^^^^^^^^ Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 17:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "'Andreas Schwab'" Cc: 5971@debbugs.gnu.org, tracker@debbugs.gnu.org, 'Stefan Monnier' , 'GNU bug Tracking System' Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.12716966525088 (code B ref 5971); Mon, 19 Apr 2010 17:05:02 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 17:04:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3uOK-0001K1-EX for submit@debbugs.gnu.org; Mon, 19 Apr 2010 13:04:12 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3uOI-0001Jv-8K; Mon, 19 Apr 2010 13:04:10 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3JH3xVC027614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Apr 2010 17:04:01 GMT Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3J62kHw010189; Mon, 19 Apr 2010 17:03:56 GMT Received: from abhmt001.oracle.com by acsmt354.oracle.com with ESMTP id 188211441271696590; Mon, 19 Apr 2010 10:03:10 -0700 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Apr 2010 10:03:08 -0700 From: "Drew Adams" References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com><8348D62071EB468F8FD5D95D35201C08@us.oracle.com> Date: Mon, 19 Apr 2010 10:03:09 -0700 Message-ID: <8092CBDD05AF419298FFE73B27D1E5C7@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: Acrf3dnm4eLw/1V7SQSMciuf9vvDTAAA3hjw X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090204.4BCC8D02.0049:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -4.3 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) > > Nothing in the doc states that they share list structure. > > There is no buffer-local value before you set it. Yes, I know that. And I noted that explicitly. > The doc is pretty clear that a buffer-local value only starts to exist > the first time it is set: > > Make VARIABLE become buffer-local whenever it is set. > At any time, the value for the current buffer is in effect, > unless the variable has never been set in this buffer, > in which case the default value is in effect. > ^^^^^^^^^^^^^^^^^^^^^^^^^^ Yes, and I explictly said that too. Please read what I wrote. I am not questioning the fact that the default value is used if no buffer-local value is set. And that behavior is adequately documented. What is _not_ documented AFAICT is that using `delete' to set the buffer-local value in buffer X also modifies the default value. There is no reason to expect that, from reading the doc. Once the default value has been modified, it is clear that buffer Y will (and should) pick it up if you have not yet set a buffer-local value in Y. What is not clear is why the _default_ value gets modified, just by setting the _buffer-local_ value (in X). And as I noted, using `nconc' (which is destructive like `delete') does not have this effect. The same code uses `nconc' to set the buffer-local value in X, and that does not also modify the default value. From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 19 13:35:37 2010 Received: (at control) by debbugs.gnu.org; 19 Apr 2010 17:35:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3usj-0001Yq-HW for submit@debbugs.gnu.org; Mon, 19 Apr 2010 13:35:37 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3usi-0001Yj-GK for control@debbugs.gnu.org; Mon, 19 Apr 2010 13:35:37 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1O3usd-0002Kc-O1; Mon, 19 Apr 2010 13:35:31 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19404.37987.720500.837410@fencepost.gnu.org> Date: Mon, 19 Apr 2010 13:35:31 -0400 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: green X-Ran: |:31RKlfp_5( List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) severity 5974 wishlist severity 5971 minor tags 5971 notabug wontfix From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: Andreas Schwab Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 18:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug wontfix To: "Drew Adams" Cc: 5971@debbugs.gnu.org, tracker@debbugs.gnu.org, 'Stefan Monnier' , 'GNU bug Tracking System' Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.12717025819925 (code B ref 5971); Mon, 19 Apr 2010 18:43:02 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 18:43:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3vvw-0002a2-PH for submit@debbugs.gnu.org; Mon, 19 Apr 2010 14:43:01 -0400 Received: from mail-out.m-online.net ([212.18.0.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3vvv-0002Zs-1u; Mon, 19 Apr 2010 14:43:00 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id F25761C0019E; Mon, 19 Apr 2010 20:42:53 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id C2C249033F; Mon, 19 Apr 2010 20:42:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id ZjO7YlORy-aQ; Mon, 19 Apr 2010 20:42:52 +0200 (CEST) Received: from igel.home (ppp-88-217-100-218.dynamic.mnet-online.de [88.217.100.218]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 19 Apr 2010 20:42:52 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 493C1CA297; Mon, 19 Apr 2010 20:42:52 +0200 (CEST) From: Andreas Schwab References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com> <8348D62071EB468F8FD5D95D35201C08@us.oracle.com> <8092CBDD05AF419298FFE73B27D1E5C7@us.oracle.com> X-Yow: My face is new, my license is expired, and I'm under a doctor's care!!!! Date: Mon, 19 Apr 2010 20:42:51 +0200 In-Reply-To: <8092CBDD05AF419298FFE73B27D1E5C7@us.oracle.com> (Drew Adams's message of "Mon, 19 Apr 2010 10:03:09 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) "Drew Adams" writes: >> > Nothing in the doc states that they share list structure. >> >> There is no buffer-local value before you set it. > > Yes, I know that. And I noted that explicitly. So you know that the default value is *the value you are modifying*. >> The doc is pretty clear that a buffer-local value only starts to exist >> the first time it is set: >> >> Make VARIABLE become buffer-local whenever it is set. >> At any time, the value for the current buffer is in effect, >> unless the variable has never been set in this buffer, >> in which case the default value is in effect. >> ^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Yes, and I explictly said that too. Please read what I wrote. Please read what I wrote. > What is _not_ documented AFAICT is that using `delete' to set the buffer-local > value in buffer X also modifies the default value. There is no reason to expect > that, from reading the doc. You are *not* modifying the buffer-local value, because *it does not exist* yet. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 19:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug wontfix To: "'Andreas Schwab'" Cc: 5971@debbugs.gnu.org, tracker@debbugs.gnu.org, 'Stefan Monnier' , 'GNU bug Tracking System' Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.127170358610477 (code B ref 5971); Mon, 19 Apr 2010 19:00:03 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 18:59:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3wC7-0002iu-Ja for submit@debbugs.gnu.org; Mon, 19 Apr 2010 14:59:45 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3wC4-0002il-VA; Mon, 19 Apr 2010 14:59:41 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3JIxTtt010470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Apr 2010 18:59:32 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3JI8VMl032247; Mon, 19 Apr 2010 18:59:28 GMT Received: from abhmt018.oracle.com by acsmt353.oracle.com with ESMTP id 188574381271703488; Mon, 19 Apr 2010 11:58:08 -0700 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Apr 2010 11:58:08 -0700 From: "Drew Adams" References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com><8348D62071EB468F8FD5D95D35201C08@us.oracle.com><8092CBDD05AF419298FFE73B27D1E5C7@us.oracle.com> Date: Mon, 19 Apr 2010 11:58:07 -0700 Message-ID: <6CC9DF69BADF4A27825D1A0BDE4219F1@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: Acrf8CIOM8F9t2KYRmSSWXvrWFmVmQAABSDg X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090203.4BCCA816.0148:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -4.3 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) > >> > Nothing in the doc states that they share list structure. > >> > >> There is no buffer-local value before you set it. > > > > Yes, I know that. And I noted that explicitly. > > So you know that the default value is *the value you are modifying*. No, I do not know that. Where does it say that `setq' modifies the default value? If there is no buffer-local value, then the default value is used, yes. That doesn't say anything about modifying or setting anything. The modification of the default value was done in buffer X. It is buffer Y that does not yet have a buffer local value. When modifying buffer X's value of the var, I used `setq' with `delete'. I did not use `setq-default'. I do not see any doc that would indicate that `setq' with `delete' should modify the default value. On the contrary, everything seems to say that setting the var using setq should set the buffer-local value (only). > >> The doc is pretty clear that a buffer-local value only > >> starts to exist the first time it is set: > >> > >> Make VARIABLE become buffer-local whenever it is set. > >> At any time, the value for the current buffer is in effect, > >> unless the variable has never been set in this buffer, > >> in which case the default value is in effect. > >> ^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > Yes, and I explictly said that too. Please read what I wrote. > > Please read what I wrote. You just repeated what I acknowledged from the beginning: it is normal that if no buffer-local value is set in buffer Y then the default value for the variable is used (returned) in buffer Y. That has nothing to do with the question at hand, which is how/why modifying/setting the buffer-local value in buffer X also ends up modifying/setting the default value. When, in buffer X, I use `setq' with `delete' I am destructively modifying the _buffer-local_ value in X, not the default value. Or at least that's what the doc says I am doing. The variable is declared with `make-variable-buffer-local', which means that whenever it is set it is the _buffer-local_ value that is set (unless I use, say, `setq-default'). > > What is _not_ documented AFAICT is that using `delete' to > > set the buffer-local value in buffer X also modifies the > > default value. There is no reason to expect that, from reading the doc. > > You are *not* modifying the buffer-local value, because *it does not > exist* yet. No, it does not yet exist when I set it (in buffer X). But it is a buffer-local variable, declared using `make-variable-buffer-local'. And that means that _whenever it is set_, it is the buffer-local value, _not_ the default value, that is set. ,---- | make-variable-buffer-local is an interactive built-in function in `C | source code'. | | (make-variable-buffer-local VARIABLE) | | Make VARIABLE become buffer-local whenever it is set. | At any time, the value for the current buffer is in effect, | unless the variable has never been set in this buffer, | in which case the default value is in effect. | Note that binding the variable with `let', or setting it while | a `let'-style binding made in this buffer is in effect, | does not make the variable buffer-local. Return VARIABLE. | | In most cases it is better to use `make-local-variable', | which makes a variable local in just one buffer. | | The function `default-value' gets the default value and `set-default' sets it. `---- What part of "whenever it is set" is one of us not understanding? Using `setq' to set the variable should set its _buffer-local_ value. Yes, until you set the buffer-local value, it is the default value that is returned for the variable. But "_whenever it is set_", it is the buffer-local value that is set, _not_ the default value. At least that's what the doc says. From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: Andreas Schwab Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 20:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug wontfix To: "Drew Adams" Cc: 5971@debbugs.gnu.org, tracker@debbugs.gnu.org, 'Stefan Monnier' , 'GNU bug Tracking System' Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.127170832716957 (code B ref 5971); Mon, 19 Apr 2010 20:19:01 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 20:18:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3xQd-0004PR-4i for submit@debbugs.gnu.org; Mon, 19 Apr 2010 16:18:47 -0400 Received: from mail-out.m-online.net ([212.18.0.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3xQb-0004PD-4C; Mon, 19 Apr 2010 16:18:46 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 318DC1C0017F; Mon, 19 Apr 2010 22:18:40 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 17473903A3; Mon, 19 Apr 2010 22:18:40 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id itChd1RnBK7C; Mon, 19 Apr 2010 22:18:39 +0200 (CEST) Received: from igel.home (ppp-88-217-100-218.dynamic.mnet-online.de [88.217.100.218]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 19 Apr 2010 22:18:38 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id C098CCA297; Mon, 19 Apr 2010 22:18:38 +0200 (CEST) From: Andreas Schwab References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com> <8348D62071EB468F8FD5D95D35201C08@us.oracle.com> <8092CBDD05AF419298FFE73B27D1E5C7@us.oracle.com> <6CC9DF69BADF4A27825D1A0BDE4219F1@us.oracle.com> X-Yow: First, I'm going to give you all the ANSWERS to today's test.. So just plug in your SONY WALKMANS and relax!! Date: Mon, 19 Apr 2010 22:18:38 +0200 In-Reply-To: <6CC9DF69BADF4A27825D1A0BDE4219F1@us.oracle.com> (Drew Adams's message of "Mon, 19 Apr 2010 11:58:07 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) "Drew Adams" writes: > No, I do not know that. Where does it say that `setq' modifies the default > value? Stop being silly. Which part of `by side effect' did you not understand? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 20:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug wontfix To: "'Andreas Schwab'" Cc: 5971@debbugs.gnu.org, tracker@debbugs.gnu.org, 'Stefan Monnier' , 'GNU bug Tracking System' Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.127170917219891 (code B ref 5971); Mon, 19 Apr 2010 20:33:02 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 20:32:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3xeG-0005Am-8O for submit@debbugs.gnu.org; Mon, 19 Apr 2010 16:32:52 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3xeD-0005Ag-OF; Mon, 19 Apr 2010 16:32:50 -0400 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3JKWhQS022423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Apr 2010 20:32:44 GMT Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3JKWdHR025480; Mon, 19 Apr 2010 20:32:39 GMT Received: from abhmt014.oracle.com by acsmt353.oracle.com with ESMTP id 188833011271709076; Mon, 19 Apr 2010 13:31:16 -0700 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Apr 2010 13:31:16 -0700 From: "Drew Adams" References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com><8348D62071EB468F8FD5D95D35201C08@us.oracle.com><8092CBDD05AF419298FFE73B27D1E5C7@us.oracle.com><6CC9DF69BADF4A27825D1A0BDE4219F1@us.oracle.com> Date: Mon, 19 Apr 2010 13:31:17 -0700 Message-ID: <1D1CB64F606C49129227A1B34D69EB26@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: Acrf/YLwvwq1vzfVSS+1xdIftPPt6QAAIe2w X-Auth-Type: Internal IP X-Source-IP: rcsinet13.oracle.com [148.87.113.125] X-CT-RefId: str=0001.0A090207.4BCCBDEC.015A:SCFMA4539811,ss=1,fgs=0 X-Spam-Score: -4.3 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) > > No, I do not know that. Where does it say that `setq' > > modifies the default value? > > Stop being silly. Which part of `by side effect' did you not > understand? Stop with the name-calling. The question is, side-effect/modification of what object? Apriori, the buffer-local value and the default value are separate Lisp objects. If there is _no_ buffer-local value, then the default value is returned for the var. But that does not mean that the buffer-local and default values are the same. It means only that the variable has _no_ b-l value, so the default value is used. And if the variable is set in the buffer, then it is _only_ the buffer-local value that is set. That is the only thing the doc indicates. According to the doc, anytime the variable is set, it is the buffer-local value (only) that is set. There is nothing in the doc that suggests that the buffer-local value and the default value share the same Lisp object. On the contrary, the impression given is that they are separate objects. The only relation between them that is described is that one of them (default value) is used as the var value if the other (b-l value) is not yet set. That does not imply that they share memory in any way. From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: Andreas Schwab Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 20:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug wontfix To: "Drew Adams" Cc: 5971@debbugs.gnu.org, tracker@debbugs.gnu.org, 'Stefan Monnier' , 'GNU bug Tracking System' Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.127170951920123 (code B ref 5971); Mon, 19 Apr 2010 20:39:02 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 20:38:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3xjr-0005EW-2C for submit@debbugs.gnu.org; Mon, 19 Apr 2010 16:38:39 -0400 Received: from mail-out.m-online.net ([212.18.0.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3xjo-0005EQ-S9; Mon, 19 Apr 2010 16:38:37 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 4A8F91C0018D; Mon, 19 Apr 2010 22:38:32 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 0DE6B902F8; Mon, 19 Apr 2010 22:38:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id xVgCtxdrJ4e4; Mon, 19 Apr 2010 22:38:31 +0200 (CEST) Received: from igel.home (ppp-88-217-100-218.dynamic.mnet-online.de [88.217.100.218]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 19 Apr 2010 22:38:31 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id E7B24CA297; Mon, 19 Apr 2010 22:38:30 +0200 (CEST) From: Andreas Schwab References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com> <8348D62071EB468F8FD5D95D35201C08@us.oracle.com> <8092CBDD05AF419298FFE73B27D1E5C7@us.oracle.com> <6CC9DF69BADF4A27825D1A0BDE4219F1@us.oracle.com> <1D1CB64F606C49129227A1B34D69EB26@us.oracle.com> X-Yow: Ha ha Ha ha Ha ha Ha Ha Ha Ha -- When will I EVER stop HAVING FUN?!! Date: Mon, 19 Apr 2010 22:38:30 +0200 In-Reply-To: <1D1CB64F606C49129227A1B34D69EB26@us.oracle.com> (Drew Adams's message of "Mon, 19 Apr 2010 13:31:17 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) "Drew Adams" writes: > If there is _no_ buffer-local value, then the default value is returned for the > var. Exactly. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2010 22:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug wontfix To: "'Andreas Schwab'" Cc: 5971@debbugs.gnu.org, tracker@debbugs.gnu.org, 'Stefan Monnier' , 'GNU bug Tracking System' Received: via spool by 5971-submit@debbugs.gnu.org id=B5971.127171485522866 (code B ref 5971); Mon, 19 Apr 2010 22:08:02 +0000 Received: (at 5971) by debbugs.gnu.org; 19 Apr 2010 22:07:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3z7v-0005wl-Fd for submit@debbugs.gnu.org; Mon, 19 Apr 2010 18:07:35 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3z7t-0005wf-GG; Mon, 19 Apr 2010 18:07:34 -0400 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3JM7QaO005271 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Apr 2010 22:07:27 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3JKgCbo021838; Mon, 19 Apr 2010 22:07:23 GMT Received: from abhmt004.oracle.com by acsmt353.oracle.com with ESMTP id 189128251271714767; Mon, 19 Apr 2010 15:06:07 -0700 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Apr 2010 15:06:07 -0700 From: "Drew Adams" References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com><8348D62071EB468F8FD5D95D35201C08@us.oracle.com><8092CBDD05AF419298FFE73B27D1E5C7@us.oracle.com><6CC9DF69BADF4A27825D1A0BDE4219F1@us.oracle.com><1D1CB64F606C49129227A1B34D69EB26@us.oracle.com> Date: Mon, 19 Apr 2010 15:06:08 -0700 Message-ID: <3DF341479674474FA6D1DD5F0DE03543@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: AcrgAEoFcoxGDLHSRui3sfGrANJe3gABfIvw X-Auth-Type: Internal IP X-Source-IP: rcsinet13.oracle.com [148.87.113.125] X-CT-RefId: str=0001.0A090205.4BCCD420.0071:SCFMA4539811,ss=1,fgs=0 X-Spam-Score: -4.3 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) > > If there is _no_ buffer-local value, then the default value > > is returned for the var. > > Exactly. OK, I get it. The problem was that the defvar defined a default value that was a particular cons cell. Then, I set the buffer-local value to (a modification of) that list structure, since the initial value returned by the variable was the default one. IOW, in the setq, it was the right-hand side, where the variable's value was used, that was the problem. Before closing the bug, please consider adding something to the doc that might make this gotcha clearer. Perhaps something like this: Although `make-variable-buffer-local' makes its argument variable become buffer local whenever it is set, any references to the variable before it is set return its default value. That includes any occurrences of the variable in an expression used to calculate the new, buffer-local value. Thanks. From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: Kevin Rodgers Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Apr 2010 09:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug wontfix To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1271843916571 (code B ref -1); Wed, 21 Apr 2010 09:59:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Apr 2010 09:58:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4WhX-00009A-QS for submit@debbugs.gnu.org; Wed, 21 Apr 2010 05:58:36 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4WhW-000094-Cb for submit@debbugs.gnu.org; Wed, 21 Apr 2010 05:58:35 -0400 Received: from lists.gnu.org ([199.232.76.165]:47655) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O4WhT-0006js-FB for submit@debbugs.gnu.org; Wed, 21 Apr 2010 05:58:31 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4WhT-0005SM-4l for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2010 05:58:31 -0400 Received: from [140.186.70.92] (port=33906 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4WhO-0005Mz-1U for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2010 05:58:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4WhJ-0001Zi-Mp for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2010 05:58:25 -0400 Received: from lo.gmane.org ([80.91.229.12]:60962) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4UNW-0006n8-Oy for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2010 03:29:48 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1O4UNU-0001Ch-4Q for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2010 09:29:44 +0200 Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Apr 2010 09:29:44 +0200 Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Apr 2010 09:29:44 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory From: Kevin Rodgers Date: Wed, 21 Apr 2010 01:29:33 -0600 Lines: 28 Message-ID: References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com><8348D62071EB468F8FD5D95D35201C08@us.oracle.com><8092CBDD05AF419298FFE73B27D1E5C7@us.oracle.com><6CC9DF69BADF4A27825D1A0BDE4219F1@us.oracle.com><1D1CB64F606C49129227A1B34D69EB26@us.oracle.com> <3DF341479674474FA6D1DD5F0DE03543@us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) In-Reply-To: <3DF341479674474FA6D1DD5F0DE03543@us.oracle.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.6 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) Drew Adams wrote: >>> If there is _no_ buffer-local value, then the default value >>> is returned for the var. >> Exactly. > > OK, I get it. > > The problem was that the defvar defined a default value that was a particular > cons cell. Then, I set the buffer-local value to (a modification of) that list > structure, since the initial value returned by the variable was the default one. > IOW, in the setq, it was the right-hand side, where the variable's value was > used, that was the problem. > > Before closing the bug, please consider adding something to the doc that might > make this gotcha clearer. Perhaps something like this: > > Although `make-variable-buffer-local' makes its argument variable become buffer > local whenever it is set, any references to the variable before it is set return > its default value. That includes any occurrences of the variable in an > expression used to calculate the new, buffer-local value. That is implied by the fact that make-variable-buffer-local is a function (vs. macro vs. special form): its argument forms are evaluated before being passed to the function by eval. -- Kevin Rodgers Denver, Colorado, USA From unknown Sun Jun 22 08:08:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Apr 2010 12:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug wontfix To: "'Kevin Rodgers'" , Received: via spool by submit@debbugs.gnu.org id=B.12718511896349 (code B ref -1); Wed, 21 Apr 2010 12:00:03 +0000 Received: (at submit) by debbugs.gnu.org; 21 Apr 2010 11:59:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4Yaq-0001eM-UL for submit@debbugs.gnu.org; Wed, 21 Apr 2010 07:59:49 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4Yao-0001eH-30 for submit@debbugs.gnu.org; Wed, 21 Apr 2010 07:59:46 -0400 Received: from lists.gnu.org ([199.232.76.165]:39995) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O4Yai-0002L2-Sn for submit@debbugs.gnu.org; Wed, 21 Apr 2010 07:59:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4Yai-0005wC-AR for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2010 07:59:40 -0400 Received: from [140.186.70.92] (port=40077 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4Yag-0005uu-Kf for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2010 07:59:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4Yaf-0000xo-1V for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2010 07:59:38 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:24695) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4Yae-0000xJ-Rx for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2010 07:59:36 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3LBxT47025665 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 21 Apr 2010 11:59:30 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3LBfh4g015701; Wed, 21 Apr 2010 11:59:29 GMT Received: from abhmt007.oracle.com by acsmt354.oracle.com with ESMTP id 195217611271851094; Wed, 21 Apr 2010 04:58:14 -0700 Received: from dradamslap1 (/10.175.219.144) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 21 Apr 2010 04:58:14 -0700 From: "Drew Adams" References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com><8348D62071EB468F8FD5D95D35201C08@us.oracle.com><8092CBDD05AF419298FFE73B27D1E5C7@us.oracle.com><6CC9DF69BADF4A27825D1A0BDE4219F1@us.oracle.com><1D1CB64F606C49129227A1B34D69EB26@us.oracle.com> <3DF341479674474FA6D1DD5F0DE03543@us.oracle.com> Date: Wed, 21 Apr 2010 04:58:17 -0700 Message-ID: <75C048F0145A46EEB9EEB49C8767A45B@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcrhPAMdkHUGWJShSE2zm1fhAYHgBQADWH/A X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090203.4BCEE8A4.0101:SCFMA922111,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.2 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) > > Before closing the bug, please consider adding something to > > the doc that might make this gotcha clearer. Perhaps something > > like this: > > > > Although `make-variable-buffer-local' makes its argument > > variable become buffer local whenever it is set, any > > references to the variable before it is set return > > its default value. That includes any occurrences of the > > variable in an expression used to calculate the new, > > buffer-local value. > > That is implied by the fact that make-variable-buffer-local > is a function (vs. macro vs. special form): its argument > forms are evaluated before being passed to the function by eval. Yeah, I know. And I shoulda known better. I didn't pay attention to the fact that I had a defvar that set the default value to a cons cell - originally it was nil (as it is again now). Still, it might help if we said something more (admittedly different from what I suggested), to help users avoid such problems destructively modifying the default value. From unknown Sun Jun 22 08:08:10 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "Drew Adams" Subject: bug#5971: closed (Re: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value) Message-ID: References: X-Gnu-PR-Message: they-closed 5971 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: notabug wontfix Reply-To: 5971@debbugs.gnu.org Date: Sat, 09 Jul 2011 05:48:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1310190481-18493-1" This is a multi-part message in MIME format... ------------=_1310190481-18493-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #5971: 23.1.95; `delete' modifies default value instead of buffer-local val= ue which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 5971@debbugs.gnu.org. --=20 5971: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D5971 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1310190481-18493-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 5971-done) by debbugs.gnu.org; 9 Jul 2011 05:47:29 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QfQO0-0004nQ-H4 for submit@debbugs.gnu.org; Sat, 09 Jul 2011 01:47:28 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QfQNy-0004nB-K0 for 5971-done@debbugs.gnu.org; Sat, 09 Jul 2011 01:47:27 -0400 Received: from localhost ([127.0.0.1]:52289) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfQNt-0003mD-Aa; Sat, 09 Jul 2011 01:47:21 -0400 From: Glenn Morris To: 5971-done@debbugs.gnu.org Subject: Re: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value References: <1ED47ADCD80A4C019EF77D4CB7C5D863@us.oracle.com> <8348D62071EB468F8FD5D95D35201C08@us.oracle.com> <8092CBDD05AF419298FFE73B27D1E5C7@us.oracle.com> <6CC9DF69BADF4A27825D1A0BDE4219F1@us.oracle.com> <1D1CB64F606C49129227A1B34D69EB26@us.oracle.com> <3DF341479674474FA6D1DD5F0DE03543@us.oracle.com> X-Spook: munitions wire transfer Telex Bush Wired Ft. Knox Rand X-Ran: Mu[4W={2/Rw[R[n0P;/KcATRA&0NZ]mQEiQN}tB7M{}@V"kb@eb($5E)hPP@n X-Hue: magenta X-Attribution: GM Date: Sat, 09 Jul 2011 01:47:21 -0400 In-Reply-To: (Kevin Rodgers's message of "Wed, 21 Apr 2010 01:29:33 -0600") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 5971-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) I don't see a need to keep open this particular report, which was marked "wontfix" some time ago. ------------=_1310190481-18493-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Apr 2010 02:42:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3gwJ-0001lE-6J for submit@debbugs.gnu.org; Sun, 18 Apr 2010 22:42:24 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3gwH-0001l7-Ft for submit@debbugs.gnu.org; Sun, 18 Apr 2010 22:42:22 -0400 Received: from lists.gnu.org ([199.232.76.165]:53075) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O3gwD-0003BU-SR for submit@debbugs.gnu.org; Sun, 18 Apr 2010 22:42:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3gwD-0000Me-5I for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2010 22:42:17 -0400 Received: from [140.186.70.92] (port=49829 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3gw7-0000LB-Ar for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2010 22:42:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3gw5-0001LU-QK for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2010 22:42:11 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:21748) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3gw5-0001LD-Fx for bug-gnu-emacs@gnu.org; Sun, 18 Apr 2010 22:42:09 -0400 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3J2g6Zl022745 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 19 Apr 2010 02:42:07 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3J2g5CC001341 for ; Mon, 19 Apr 2010 02:42:05 GMT Received: from abhmt015.oracle.com by acsmt353.oracle.com with ESMTP id 185978971271644859; Sun, 18 Apr 2010 19:40:59 -0700 Received: from dradamslap1 (/10.175.221.180) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 18 Apr 2010 19:40:59 -0700 From: "Drew Adams" To: Subject: 23.1.95; `delete' modifies default value instead of buffer-local value Date: Sun, 18 Apr 2010 19:41:18 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: Acrfacn4Xs0SMElmRkeadRaW94Eijg== X-Auth-Type: Internal IP X-Source-IP: rcsinet13.oracle.com [148.87.113.125] X-CT-RefId: str=0001.0A090203.4BCBC2FF.02CC:SCFMA4539811,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Visit this file, without loading it: http://www.emacswiki.org/emacs/wide-n.el Change this line: (setq wide-n-restrictions (remove (cons mrk1 mrk2) wide-n-restrictions)) To this: (setq wide-n-restrictions (delete (cons mrk1 mrk2) wide-n-restrictions)) Then load the file (with `delete'). Then: In some buffer X, do `C-x n n', then `C-x n x'. Check the value of variable `wide-n-restrictions'. In another buffer Y, just check the value of the variable. You will see that the default value, which should be `(all)', has been changed to be what the new value is for buffer X. Try the same thing again (starting from scratch), but using `remove' (the original code) instead of `delete'. There is no problem now: only the buffer-local value is ever set. This doesn't seem right to me. In GNU Emacs 23.1.95.1 (i386-mingw-nt5.1.2600) of 2010-04-03 on G41R2F1 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/imagesupport/include' ------------=_1310190481-18493-1--