help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED] (was: problems with better-registers: turn-off-all-minor modes


From: Uwe Brauer
Subject: [SOLVED] (was: problems with better-registers: turn-off-all-minor modes or remove all text-properties)
Date: Sun, 24 Jul 2022 21:51:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)




> Thanks, that did not occur to me. I tried to advice since a while since
> it makes debugging difficult.

> In any case, maybe because I have not used it for a while, my attempts
> failed:

> (defadvice set-property (before removeproperties activate)
>   "Remove all text properties before setting the property"
>   (let ((inhibit-read-only t))
>     (set-text-properties (point-min) (point-max) nil)))


> (defadvice set-property (after removeproperties activate)
>   "Remove all text properties before setting the property"
>   (let ((inhibit-read-only t))
>     (set-text-properties (point-min) (point-max) nil)))

> None of them worked

The magic seems to be

(defadvice copy-to-register (before removeproperties activate)
  "Remove all text properties before setting the property"
  (let ((inhibit-read-only t))
    (set-text-properties (point-min) (point-max) nil)))

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]