Subject: bug#19740: 25.0.50; Bad comment indentation by `C-M-q' in `emacs-lisp-mode'

From: [email-masked]
Date: Wed, 05 Jul 2017 23:00:03 -0400

tags 19740 fixed
close 19740 26.1
quit

[email-masked] writes:

>> This is a regression introduced after Emacs 20 (perhaps after 21).
>>
>> Emacs should not indent the first `;;' comment line here by a space.
>> That does no good and interferes with alignment of a multi-line
>> comments and multiple separate comments that are on the same level.
>>
>> (let* ( ;; If FOOBAR then blah the blahdy blah and other blahs if blah,
>>        ;; blah, or blah.  Unless, that is, blah, blah, or blah.
>>        (the-tatas (bar-bar-toto-babar foo1 foo2 foo3))
>>        ...)
>>
>> In Emacs 20, this is the result - no extra space inserted.  The two
>> comment lines, which are logically at the same level, and in this case
>> are part of a single multi-line comment, are aligned vertically.
>>
>> (let* (;; If FOOBAR then blah the blahdy blah and other blahs if blah,
>>        ;; blah, or blah.  Unless, that is, blah, blah, or blah.
>>        (the-tatas (bar-bar-toto-babar foo1 foo2 foo3))
>>        ...)
>
>
> This was introduced in [1: bdbe3a8995].  I think in most contexts, it
> makes sense to put the space, but it definitely looks wrong in a lisp
> let.  Here's patch to override the alignment for comments following an
> open in paren in lisp modes.

Pushed: [2: 7a0170de20] 

[2: 7a0170de20]: 2017-07-05 22:52:36 -0400
  Don't put whitespace between open paren and comment in Lisp modes (Bug#19740)
  http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=7a0170de20fe1225d3eeac099d1e61a0c0410bf3