all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 66404@debbugs.gnu.org
Subject: bug#66404: [PATCH] Use delete-all-overlays in clean-mode
Date: Sun, 08 Oct 2023 02:58:45 -0700	[thread overview]
Message-ID: <87mswttoyi.fsf@breatheoutbreathe.in> (raw)

[-- Attachment #1: Type: text/plain, Size: 78 bytes --]

Tags: patch

Is there a reason to use dolist instead of delete-all-overlays?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Use-delete-all-overlays-in-clean-mode.patch --]
[-- Type: text/patch, Size: 902 bytes --]

From d47e0cbe9ecaeb0cd4da12ab70f03d4c138f9265 Mon Sep 17 00:00:00 2001
From: Joseph Turner <joseph@breatheoutbreathe.in>
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


             reply	other threads:[~2023-10-08  9:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-08  9:58 Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-10-08 10:26 ` bug#66404: [PATCH] Use delete-all-overlays in clean-mode Eli Zaretskii
2023-10-08 10:32   ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-08 11:40     ` Eli Zaretskii
2023-10-08 20:54       ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mswttoyi.fsf@breatheoutbreathe.in \
    --to=bug-gnu-emacs@gnu.org \
    --cc=66404@debbugs.gnu.org \
    --cc=joseph@breatheoutbreathe.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.