help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: indentation


From: Philip Kaludercic
Subject: Re: indentation
Date: Fri, 30 Apr 2021 07:58:48 +0000

<ptlo@centrum.cz> writes:

> But the problem where it all started is, when I press enter, the new
> empty line got indented to first character of previous line. There is
> absolutely no reason to impose that the block shall continue. Instead,
> an END statement may follow which is indented differently. Also one
> can wish to insert an empty line and then an automated insertion of
> spaces for no reason is hard to justify. Indeed I always felt the urge
> to delete those spaces (still was thinking how to do it as fast as
> possible and get over without new indentation...)

What language are we talking about? Maybe it is not clever enough,
ie. you haven't enabled electric-pair-mode? When working with C, that
automatically inserts the opening and closing parentheses, and when I
press enter

      {|}

becomes

      {
        |
      }

just as I would want it. And of course, all instructions should be
intended.

Even if I weren't to enable electric-pair-mode, electric-indent-mode
would do the right thing when closing a block, because it automatically
re-indents the '}', when it is on it's own.

-- 
        Philip K.



reply via email to

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