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

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

bug#36727: 27.0.50; indent bug


From: Devon Sean McCullough
Subject: bug#36727: 27.0.50; indent bug
Date: Thu, 10 Oct 2019 11:40:06 +0800

> On Oct 10, 2019, at 8:02 AM, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> 
> Devon Sean McCullough <Emacs-Hacker2018@jovi.net> writes:
> 
>> (assert (progn
>>        Indentation) nil
>>        "<-- should line up with progn.")
>> 
>> In emacs-lisp-mode, both indent-pp-sexp and indent-for-tab-command
>> indent this incorrectly as above (string lines up with capital letter I)
>> instead of correctly as below (string lines up with progn’s open paren)
>> 
>> (assert (progn
>>        Indentation) nil
>>      "<-- should line up with progn.")
> 
> emacs-lisp-mode also flags that `nil' with a warning face -- because
> this isn't a style that's recommended.
> 
> So I don't know whether fixing up indentation in code that's already
> badly formatted is something we want to do.  Any opinions?

Such indentation failures will conceal errors which proper indentation would 
highlight.
Any indenter capable of such mistakes is almost certainly buggy in many other 
ways.

                Peace
                        —Devon

P.S. Is it worth time and attention to fix any time soon?
It’s been decades since I got paid to maintain Emacs
so I have no way to judge that.  Machine learning
may offer better ways to weigh code beauty.




reply via email to

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