From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66404: [PATCH] Use delete-all-overlays in clean-mode Date: Sun, 08 Oct 2023 02:58:45 -0700 Message-ID: <87mswttoyi.fsf@breatheoutbreathe.in> Reply-To: Joseph Turner Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17610"; mail-complaints-to="usenet@ciao.gmane.io" To: 66404@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 08 12:00:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qpQaB-0004JM-VJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Oct 2023 12:00:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpQZk-0005Up-3n; Sun, 08 Oct 2023 05:59:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpQZf-0005US-3I for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 05:59:47 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpQZd-0005KU-7i for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 05:59:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpQZt-0007h4-UC for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 06:00:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Oct 2023 10:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66404 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169675918229500 (code B ref -1); Sun, 08 Oct 2023 10:00:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Oct 2023 09:59:42 +0000 Original-Received: from localhost ([127.0.0.1]:56284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpQZa-0007fk-7N for submit@debbugs.gnu.org; Sun, 08 Oct 2023 05:59:42 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:55838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpQZY-0007fW-CN for submit@debbugs.gnu.org; Sun, 08 Oct 2023 05:59:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpQZ9-0005TD-5l for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 05:59:15 -0400 Original-Received: from out-205.mta0.migadu.com ([91.218.175.205]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpQZ6-0005Fh-HX for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 05:59:13 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1696759151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=CyZkrCT5X5PgrgBl1oQn3qvsQLOlEcG5WGLFW3rWNzI=; b=ZW/jPadvRdXRjoIOsGOSYzFlYKr9h0YtOkSNtRGhtH9fsUGlxY85tfRf91N3Rr8kwLHghg NLWK7vVSPfiCswfS9kdR8/59w0Pup0DYWgoBLAP4IeWIMtz0N2rjSOuJtrquQTefYQASqX SzmJDWN+IfZK9IZxFM77vOePDfc/tng= X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=91.218.175.205; envelope-from=joseph@breatheoutbreathe.in; helo=out-205.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272071 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Is there a reason to use dolist instead of delete-all-overlays? --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Use-delete-all-overlays-in-clean-mode.patch >From d47e0cbe9ecaeb0cd4da12ab70f03d4c138f9265 Mon Sep 17 00:00:00 2001 From: Joseph Turner Date: Sun, 8 Oct 2023 02:54:10 -0700 Subject: [PATCH] Use delete-all-overlays in clean-mode * lisp/simple.el (clean-mode): Replace dolist --- lisp/simple.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index b770d9d7d33..8f2bd84d805 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -549,8 +549,7 @@ Other major modes are defined by comparison with this one." "A mode that removes all overlays and text properties." (kill-all-local-variables t) (let ((inhibit-read-only t)) - (dolist (overlay (overlays-in (point-min) (point-max))) - (delete-overlay overlay)) + (delete-all-overlays) (set-text-properties (point-min) (point-max) nil) (setq-local yank-excluded-properties t))) -- 2.41.0 --=-=-=--