Subject: Re: bug#44554: 27.1; Feature request: SRFI-62 style comments for Emacs Lisp.

From: Andrea Corallo <[email-masked]>
Date: Fri, 13 Nov 2020 14:07:46 +0000

Stefan Kangas <[email-masked]> writes:

> Andrea Corallo <[email-masked]> writes:
>
>> That said I believe `comment-dwim' solves already this problem to a good
>> degree for me.
>>
>> given:
>>
>> (foo (bar))
>>
>> having as a region '(bar)' M-; produces
>>
>> (foo ;; (bar)
>>      )
>
> Indeed.
>
> What's less fun is when you have to back the change out, or when you
> want to incrementally comment out a nested sexp.  It works well, but
> it's a wee bit fiddly.
>
> For example, given:
>
> (foo (bar ...
>           (baz ...)))
>
> With `comment-dwim', I might get something like:
>
> (foo ;; (bar ...
>      ;;      ;; (baz ...)
>      ;;      )
>      )
>
> This would be more convenient:
>
> (foo #;(bar ...
>           #;(baz ...)))

Agree, that's one of the reasons why I agree would be nice to have ;)

As typically we do not commit commented code is no big deal as we
probably (at least I) revert the unnecessary diff hunks, but yeah would
be an improvement.  Also uncommenting would put the code in the initial
state instead of leaving unnecessary newlines.

  Andrea