[Top][All Lists]

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

Re: [External] : Tab completion and electric-indent-mode

From: Eli Zaretskii
Subject: Re: [External] : Tab completion and electric-indent-mode
Date: Sat, 18 Jun 2022 11:17:05 +0300

> Date: Sat, 18 Jun 2022 10:05:54 +0200 (CEST)
> From:
> Cc:
>  What exactly indentation and reindentation do depends on the current
>  major mode. electric-indent-mode just makes the mode-specific
>  indentation to happen automatically in certain situations, where Emacs
>  thinks the user expects reindentation.
>  If you want to know how a specific major mode indents text, you need
>  to look for answers in that mode, not in electric-indent-mode, because
>  the latter simply cannot give you the answer.
> How can a user get that information, are there commands for that?

The commands for that are the usual Help commands, but you need to
apply them to the major mode you are interested in.

>  Toggle on-the-fly reindentation of text lines (Electric Indent mode).
>  When enabled, this reindents whenever the hook `electric-indent-functions'
>  returns non-nil, or if you insert one of the "electric characters".
>  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.
>  By "reindent" we mean remove any existing indentation, and then
>  indent the line according to context and rules of the major mode.
> Can there be a clarification that reindentation removes the existing 
> indentation
> with new indentation rules applied?

??? Isn't the above saying precisely that?  Or maybe I don't understand
what you need clarified?

reply via email to

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