emacs-devel
[Top][All Lists]
Advanced

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

Re: [IDEA] Add function clean-buffer


From: Joseph Turner
Subject: Re: [IDEA] Add function clean-buffer
Date: Fri, 08 Sep 2023 17:59:53 -0700


On September 8, 2023 5:38:46 PM PDT, Richard Stallman <rms@gnu.org> wrote:
>[[[ To any NSA and FBI agents reading my email: please consider    ]]]
>[[[ whether defending the US Constitution against all enemies,     ]]]
>[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>Why make this command kill local variables?
>Most buffer-local variables come from the major mode.
>Is it really desirable to reliminate the major mode?
>
>Eliminating the major mode is what `fundamental-mode' does.
>Text properties are usually related to the major mode,
>often due to Font Lock mode.
>
>Should `fundamental-mode' eliminate text properties?  Or perhaps only
>some text properties?
>
>Should `clean-buffer' eliminate only the text properties and overlays
>that do NOT come from the major mode?

I'm also concerned that clean-buffer is too vague a function name, and so the 
scope of its behavior is not clear. I can see that some programs may want to 
"clean a buffer" by eliminating text properties and overlays but not killing 
local variables, whereas others may want to do all three and potentially 
something else.

At this point, I'm open to letting this patch go ignored.

Thank you for considering this idea with me!

Joseph



reply via email to

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