Subject: Re: bug#22564: Fundamental mode isn't fundamental enough.

From: Richard Stallman <[email-masked]>
Date: Wed, 04 May 2022 18:49:15 -0400

[[[ 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. ]]]

  > > But what does Electric Indent mode it do in modes that DON'T customize it?

  > That is only important to document if enough important major modes
  > don't customize it.

Fundamental mode is one -- and that's enough.  It is the default
mode if you visit a file whose name has no special extension.
For instance, `foo'.

What DOES Electric Indent mode do in Fundamental mode?
Nothing?

I am starting to think that is what it does.

  > Sorry, I disagree that Fundamental mode is important.  Its being the
  > default doesn't mean users frequently see it, not at all.

I do.  And not for any special reason.  If I want to put some notes
in a file, I give it a simple name.  I don't add an extension just to
get some other mode.  (Do you?)  I find that Fundamental mode is fine.

    > The electric characters normally include the newline, but can also
    > include other characters as needed by the major mode; see
    > `electric-indent-chars' for the actual list.

Adding that would be useful, but it isn't enough because it doesn't
answer that crucial question.

If someone tells me the answer, I will document it.

  > > How about adding, "Typically the major mode controls what reindenting does."?

  > I'm sorry, I don't think I understand how saying that would help.
  > Unless a person knows "what reindenting does" (or even what is
  > "reindenting"), this leaves the issue as obscure as it was before.

The Emacs Manual does not define "reindenting".  It is not exactly
synonymous with "indenting", so I think this needs clarification 
in the manual itself.

Then the doc string of Electric Indent mode could refer to the
appropriate node in the Emacs Manual.

I think reindenting means this:

  In major modes where indenting a line idempotently adjusts its
  indentation to what is called for by the line's contents and
  context, "reindenting" the line is the same as indenting it.

  In other situations, the concept of "reindenting" is not
  really applicable, so commands that should "reindent" actually
  do nothing or have some other definion.

Is this entirely correct?

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)