Function: clean-mode

clean-mode is an interactive and byte-compiled function defined in simple.el.gz.

Signature

(clean-mode)

Documentation

A mode that removes all overlays and text properties.

This mode runs the hook clean-mode-hook, as the final or penultimate step during initialization.

View in manual

Probably introduced at or before Emacs version 29.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/simple.el.gz
(define-derived-mode clean-mode fundamental-mode "Clean"
  "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))
    (set-text-properties (point-min) (point-max) nil)
    (setq-local yank-excluded-properties t)))