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

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

bug#47146: 27.0.50; Unexpected indentation for pcase forms in emacs-lisp


From: Stefan Monnier
Subject: bug#47146: 27.0.50; Unexpected indentation for pcase forms in emacs-lisp-mode
Date: Thu, 18 Mar 2021 09:51:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> Starting Emacs with:
>>
>>     $ emacs -Q
>>
>> I get the following indentation:
>>
>>     (defun word (arg)
>>       (pcase arg
>>         ('love
>>          'amour)
>>         ('always
>>          'toujours)
>>         ('if
>>             'si)
>>         ('emacs
>>          'emacs)))
>
> I guess `lisp-indent-calc-next' is interpreting the "('if" as if it were
> "(if"?

Looks like it, indeed.

> I must admit I have some difficulties in following the logic in that
> function, perhaps Stefan has some insights here (added to CCs).

I'm not very familiar with our Lisp indentation code, I'm afraid (so
much so that I often feel like replacing it with one based on SMIE, tho
I luckily recognize it as NIH-syndrome so I managed to resist the
temptation so far).


        Stefan






reply via email to

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