emacs-devel
[Top][All Lists]
Advanced

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

Re: request a change to electric.el


From: Stefan Monnier
Subject: Re: request a change to electric.el
Date: Sun, 28 Aug 2022 11:08:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

MICHAEL J MCCLENNEN [2022-08-27 20:19:40] wrote:
> This is directed at either K. Shane Hartman or else whoever is currently in
> charge of maintaining electric.el. Could you please make the following
> change to this module? The effect is to adapt electric-indent-mode to people
> like me who use indented lines instead of completely blank lines between
> their statements.

`electric-indent-mode` was mainly designed for modes where almost all
lines are indented and blank lines between statements have no particular
significance, so I don't understand what you mean.

Can you give a concrete example of the behavior you want to avoid (and
please clarify in which major mode you're doing it)?

My crystal ball suggests that maybe you're working in `text-mode` and
that what you're really looking for is `indented-text-mode`.

> 233a234,237
>> (defvar-local electric-indent-preserve-whitespace nil
>>   "If non-nil, whitespace will not be removed from a line that is reindented
>> after a newline.")

Which whitespace is this affecting?  The one at the beginning of the
line?  at the end of the line?  both?  something else?  Does it affect
only the line that is after an newline inserted newline (as the "after
a newline" suggests)?  Or rather the line before that newline?

Have you tried to set `electric-indent-inhibit`?


        Stefan




reply via email to

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