From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: robin.neatherway@gmail.com, larsi@gnus.org,
20846@debbugs.gnu.org, Dmitry Gutov <dgutov@yandex.ru>
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 10:09:41 -0400 [thread overview]
Message-ID: <jwvh7inhsbb.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8335u780u6.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 28 May 2021 16:06:09 +0300")
> Then that sentence is misleading and should be rephrased, 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.
[ It does not say intend to that. It says to return `noindent` when
indentation is impossible and gives "inside a string" as an example of
a reason why indentation might not be possible. ]
In any case, this argues in favor of `electric-indent-mode` calling
`indent-line-function` even when we're inside a comment.
The (nth 8 (syntax-ppss)) test has been in `electric-indent-mode` from
the very beginning, but I must say I can't remember why I put it in,
I think it was a mistake and we should remove it.
Especially since it can be re-added easily by configuring
`electric-indent-functions` for those modes/users who prefer it that way.
Stefan
next prev parent reply other threads:[~2021-05-28 14:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-18 15:40 bug#20846: 24.4; Electric-indent-mode does not call indent-line-function after hitting RET inside a comment Robin Neatherway
2015-06-18 15:50 ` bug#20846: Reproduction instruction correction Robin Neatherway
2021-05-26 23:32 ` bug#20846: 24.4; Electric-indent-mode does not call indent-line-function after hitting RET inside a comment Lars Ingebrigtsen
2021-05-27 7:00 ` Eli Zaretskii
2021-05-27 23:43 ` Lars Ingebrigtsen
2021-05-28 5:49 ` Eli Zaretskii
2021-05-28 12:56 ` Dmitry Gutov
2021-05-28 13:06 ` Eli Zaretskii
2021-05-28 13:35 ` Dmitry Gutov
2021-05-28 14:04 ` Eli Zaretskii
2021-05-28 14:09 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-05-28 14:16 ` Eli Zaretskii
2021-05-29 2:26 ` Lars Ingebrigtsen
2021-05-29 13:24 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-30 4:14 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvh7inhsbb.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=20846@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
--cc=eliz@gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
--cc=robin.neatherway@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).