GNU bug report logs - #54613
29.0.50; uncomment-region in sh-mode deletes extra char

Previous Next

Package: emacs;

Reported by: Filipp Gunbin <fgunbin <at> fastmail.fm>

Date: Mon, 28 Mar 2022 17:20:02 UTC

Severity: normal

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Filipp Gunbin <fgunbin <at> fastmail.fm>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 54613 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#54613: 29.0.50; uncomment-region in sh-mode deletes extra char
Date: Tue, 29 Mar 2022 18:17:35 +0300
On 29/03/2022 14:59 +0200, Lars Ingebrigtsen wrote:

> Filipp Gunbin <fgunbin <at> fastmail.fm> writes:
>
>> - Notice that `-' after "cat" disappeared
>
> I can reproduce this issue, too.
>
> What happens is that we have the following:
>
> curl -s -d @- http://example.org <<EOF \
> # cat -
>
> with point after "cat -".  In that case, (comment-enter-backward) will
> skip back past the " -", because comment-end-skip is
>
> "[ 	]*\\(\\s>\\|
> \\)"
>
> And...  \s> matches the " -\\'"?  Hm.  I'm not sure what's the real
> problem here is.  Should comment-end-skip have that value in shell
> scripts?  On the other hand, commenting out bits of a heredoc-introduced
> command with a continuation line is pretty hairy in itself.
>

I'm seeing in debugging that "-" after "cat" gets syntax-class "comment
end", which seems wrong.  Just in buffer, outside of running
uncomment-region, it doesn't happen.

Filipp




This bug report was last modified 3 years and 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.