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: Thu, 27 May 2021 10:00:42 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Thu, 27 May 2021 01:32:50 +0200
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 20846@debbugs.gnu.org
> 
> If I understand correctly, this bug report is about
> `indent-line-function' not being called in comments?
> 
> In which case, this if an easier way to reproduce is:
> 
> emacs -Q /tmp/foo.c
> M-: (setq-local indent-line-function (lambda () (message "indent"))) RET
> /* RET
> 
> Inside the comment, the indentation function is not called, but it's
> called everywhere else.
> 
> I'm not quite sure whether this is by design or not -- TAB is certainly
> meaningful in comments, so I'm not sure why RET is handled specially
> here.

maybe the idea is that indent-line-function is only for indenting
code?





reply via email to

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