5

The function remove-text-properties requires a list for the third argument props -- e.g., (remove-text-properties start end '(face nil))

How can I remove all text properties in a buffer in one fell swoop, without necessarily knowing what all of those properties are?

lawlist
  • 19,106
  • 5
  • 38
  • 120

1 Answers1

7

Maybe this:

(let ((inhibit-read-only t))
  (set-text-properties (point-min) (point-max) nil))
abo-abo
  • 14,113
  • 1
  • 30
  • 43
  • Yes, that works -- thank you very much. I am adding your snippet to my custom version of a fundamental-mode to essentially restore everything in the buffer to just raw plain text. – lawlist May 19 '15 at 20:25