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: Lars Ingebrigtsen
Subject: bug#20846: 24.4; Electric-indent-mode does not call indent-line-function after hitting RET inside a comment
Date: Sat, 29 May 2021 04:26:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> 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.

This bit?

    (when (and
[...]
               (not
                (or (memq act '(nil no-indent))
                    ;; In a string or comment.
                    (unless (eq act 'do-indent) (nth 8 (syntax-ppss))))))))


Uhm...  I stared at that logic for a couple of minutes, but I'm still
not able to convince myself that I understand it, so could you do the
necessary here?  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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