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

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

bug#20846: 24.4; Electric-indent-mode does not call indent-line-function


From: Eli Zaretskii
Subject: bug#20846: 24.4; Electric-indent-mode does not call indent-line-function after hitting RET inside a comment
Date: Fri, 28 May 2021 17:04:05 +0300

> Cc: robin.neatherway@gmail.com, larsi@gnus.org, monnier@iro.umontreal.ca,
>  20846@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Fri, 28 May 2021 16:35:51 +0300
> 
> > because my
> > reading of it is that it clearly states that auto-indentation inside
> > strings is generally impossible, and expects the implementations to
> > behave like that.
> 
> Consider this from a design POV: if all indentation functions were 
> supposed to return 'noindent when inside a string or comment, 
> indent-for-tab-command could do that check itself and avoid calling 
> indent-line-function entirely in that case.

Not if calling the function in that case was a rare exception, which
is what my interpretation of that text suggests.

> And also that #'indent-relative (the default value of 
> indent-line-function) does indent inside strings and comments.

Documentation should be clear enough to not require the reader to
consider examples in order to understand it.





reply via email to

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