From unknown Wed Jun 25 00:26:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46836: 28.0.50; Clean up obsolete comment for unchain_marker Resent-From: Matt Armstrong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Feb 2021 22:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46836 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 46836@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161455288218774 (code B ref -1); Sun, 28 Feb 2021 22:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Feb 2021 22:54:42 +0000 Received: from localhost ([127.0.0.1]:47491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGUxV-0004si-Pa for submit@debbugs.gnu.org; Sun, 28 Feb 2021 17:54:42 -0500 Received: from lists.gnu.org ([209.51.188.17]:39740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGUxT-0004sa-S7 for submit@debbugs.gnu.org; Sun, 28 Feb 2021 17:54:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGUxT-0005uZ-K4 for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2021 17:54:39 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:56001) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGUxR-00037I-Is for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2021 17:54:39 -0500 Received: from matts-mbp-2016.lan (24-113-169-116.wavecable.com [24.113.169.116]) (Authenticated sender: matt@rfc20.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id BD6AA100002 for ; Sun, 28 Feb 2021 22:54:31 +0000 (UTC) From: Matt Armstrong Date: Sun, 28 Feb 2021 14:54:27 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=217.70.178.231; envelope-from=matt@rfc20.org; helo=relay11.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, 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.7 (-) 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.7 (--) --=-=-= Content-Type: text/plain I wondered why there was a scare comment for unchain_marker, when the code itself did not look like it was especially different from the other nearby functions. It turns out that the call into this function from GC was removed a few years ago. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-Clean-up-obsolete-comment.patch Content-Transfer-Encoding: quoted-printable >From c03f9fc86ee79a995acae012cac07609ebaa3d5e Mon Sep 17 00:00:00 2001 From: Matt Armstrong Date: Sun, 28 Feb 2021 14:41:33 -0800 Subject: [PATCH] Clean up obsolete comment MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Commit cf3164523b (* src/alloc.c: Avoid O(N=C2=B2) complexity when unchaining markers (bug#24548)., 2018-03-23) removed the call from GC into unchain_marker, so there is no need to warn about it. * src/marker.c (unchain_marker): Clean up obsolete comment. --- src/marker.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/marker.c b/src/marker.c index 5979151317..2b137b14c8 100644 --- a/src/marker.c +++ b/src/marker.c @@ -634,16 +634,15 @@ set_marker_restricted_both (Lisp_Object marker, Lisp_= Object buffer, /* Detach a marker so that it no longer points anywhere and no longer slows down editing. Do not free the marker, though, as a change function could have inserted it into an undo list (Bug#30931). */ + void detach_marker (Lisp_Object marker) { Fset_marker (marker, Qnil, Qnil); } =20 -/* Remove MARKER from the chain of whatever buffer it is in, - leaving it points to nowhere. This is called during garbage - collection, so we must be careful to ignore and preserve - mark bits, including those in chain fields of markers. */ +/* Remove MARKER from the chain of whatever buffer it is in. Set its + buffer NULL. */ =20 void unchain_marker (register struct Lisp_Marker *marker) --=20 2.30.0 --=-=-= Content-Type: text/plain In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.3.0, NS appkit-2022.30 Version 11.2.1 (Build 20D74)) of 2021-02-27 built on matts-mbp-2016.lan Repository revision: de33de1a660283f45a10acfaedef20c460553dbd Repository branch: master Windowing system distributor 'Apple', version 10.3.2022 System Description: macOS 11.2.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 01 08:12:55 2021 Received: (at control) by debbugs.gnu.org; 1 Mar 2021 13:12:55 +0000 Received: from localhost ([127.0.0.1]:48460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGiM2-0007SA-R8 for submit@debbugs.gnu.org; Mon, 01 Mar 2021 08:12:55 -0500 Received: from quimby.gnus.org ([95.216.78.240]:42294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGiM0-0007Rl-Fj for control@debbugs.gnu.org; Mon, 01 Mar 2021 08:12:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ue2ecH/C8e2huGku/6UORKXY+HB0FoDJV3JRVqdz4Mk=; b=Saoxz5hXLirbs0AZOT1Jhp455V q+wxY21pFiCkN3xipLyZyBtcLI1sMVvEDo+0786IwPBu1tFEUDMkiHaKvAo/nAmAIt3R1m44gpNsu 1A3XCzSQBPLqwDvFBYeBPlqpFcj0F34/PieHlKiqQGH1Eifmue0DU1wS5Z3A9O9iqaLM=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGiLs-00026l-96 for control@debbugs.gnu.org; Mon, 01 Mar 2021 14:12:46 +0100 Date: Mon, 01 Mar 2021 14:12:43 +0100 Message-Id: <877dmr81bo.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #46836 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 46836 + patch quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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: -1.0 (-) tags 46836 + patch quit From unknown Wed Jun 25 00:26:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46836: 28.0.50; Clean up obsolete comment for unchain_marker Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Mar 2021 13:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46836 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Matt Armstrong Cc: 46836@debbugs.gnu.org Received: via spool by 46836-submit@debbugs.gnu.org id=B46836.16146054056209 (code B ref 46836); Mon, 01 Mar 2021 13:31:01 +0000 Received: (at 46836) by debbugs.gnu.org; 1 Mar 2021 13:30:05 +0000 Received: from localhost ([127.0.0.1]:48488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGice-0001bm-OA for submit@debbugs.gnu.org; Mon, 01 Mar 2021 08:30:05 -0500 Received: from quimby.gnus.org ([95.216.78.240]:42442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGicZ-0001YU-UA for 46836@debbugs.gnu.org; Mon, 01 Mar 2021 08:30:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=HtZCoBOXaOU+Ot64kbJiTSBRF00nZmKWHk4UtmCYe5I=; b=klLbTMGUIq0CHWjDT5AEP4/PDP EZ5KdO1ZPK05ueoWAoK+xjGNzdvSaln0CuAPqCd4GjzKp8W7IcCyPOqKj1TChrQJrcb9X5QDwg0r1 EaZekOZ9aqnQrIlH/Oqc8ChYoneYEY6hKpR7LDvwUUvKsRJcoD6q1oe2LB8CaDJnZths=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGicQ-0002Eg-RF; Mon, 01 Mar 2021 14:29:53 +0100 From: Lars Ingebrigtsen References: X-Now-Playing: Lightning Bolt's _Sonic Citadel_: "=?UTF-8?Q?H=C3=BCsker_?= =?UTF-8?Q?D=C3=B6nt?=" Date: Mon, 01 Mar 2021 14:29:49 +0100 In-Reply-To: (Matt Armstrong's message of "Sun, 28 Feb 2021 14:54:27 -0800") Message-ID: <87sg5f6lyq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Matt Armstrong writes: > I wondered why there was a scare comment for unchain_marker, when the > code itself did not look like it was especially different from the other > nearby functions. It turns out that the call into t [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) 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: -1.0 (-) Matt Armstrong writes: > I wondered why there was a scare comment for unchain_marker, when the > code itself did not look like it was especially different from the other > nearby functions. It turns out that the call into this function from GC > was removed a few years ago. [...] > -/* Remove MARKER from the chain of whatever buffer it is in, > - leaving it points to nowhere. This is called during garbage > - collection, so we must be careful to ignore and preserve > - mark bits, including those in chain fields of markers. */ > +/* Remove MARKER from the chain of whatever buffer it is in. Set its > + buffer NULL. */ Thanks; applied to Emacs 28. Looking at the code in unchain_marker, I was a bit confused, because the code looks very straightforward? I wondered whether the function could also be simplified now that it doesn't have to preserve mark bits... But all the special mark bit code was removed from this code a couple decades ago. :-) commit 5e097e002ba08205c8a4643b3495dbd45462147f Author: Stefan Monnier AuthorDate: Thu Jun 26 23:17:50 2003 +0000 ... else - { - omark = XMARKBIT (XMARKER (prev)->chain); - XMARKER (prev)->chain = next; - XSETMARKBIT (XMARKER (prev)->chain, omark); - } -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 01 08:30:11 2021 Received: (at control) by debbugs.gnu.org; 1 Mar 2021 13:30:11 +0000 Received: from localhost ([127.0.0.1]:48491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGicl-0001kK-2M for submit@debbugs.gnu.org; Mon, 01 Mar 2021 08:30:11 -0500 Received: from quimby.gnus.org ([95.216.78.240]:42456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGice-0001Yb-NC for control@debbugs.gnu.org; Mon, 01 Mar 2021 08:30:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zwXSKuvF93jhE13vcHdsqwgjIkD97clshwQ4p6iC0LU=; b=lDSct5niHaKoXrKvWl+utl2fdm TQSeD7whbosolk0twdqip4eLk03gfjD/2OBDhFx2uE5WJYopjXVpaHt09aLobd/kEvRLlyvv6KbF5 RRXAl/crmAeztjRvzpBxt5s5k7GJRSb70edIZwV6WisoNm1YoJEnQQLiKB18cQ9piHWw=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGicX-0002Eo-2y for control@debbugs.gnu.org; Mon, 01 Mar 2021 14:29:59 +0100 Date: Mon, 01 Mar 2021 14:29:55 +0100 Message-Id: <87r1kz6lyk.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #46836 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 46836 fixed close 46836 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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: -1.0 (-) tags 46836 fixed close 46836 28.1 quit