GNU bug report logs - #22368
vhdl comment-uncomment problem, apparently (or not) related to 14335 and 5997

Previous Next

Package: emacs;

Reported by: John Chapple <jrchapple <at> sympatico.ca>

Date: Thu, 14 Jan 2016 00:59:01 UTC

Severity: normal

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 22368 <at> debbugs.gnu.org (full text, mbox):

From: Reto Zimmermann <reto <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>, John Chapple <jrchapple <at> sympatico.ca>
Cc: "22368 <at> debbugs.gnu.org" <22368 <at> debbugs.gnu.org>
Subject: Re: bug#22368: Another way to produce the same result
Date: Wed, 19 Aug 2020 13:52:22 +0200
[Message part 1 (text/plain, inline)]
Thanks,

vhdl-mode is using function 'comment-region' from the ‘newcomment.el’ 
package. With the default value of 1 for option 'comment-padding' the 
comment string "-- " is inserted, resulting in

-- -- this is a test comment

-- library ieee;
-- use        ieee.std_logic_1164.all

for which uncommenting works fine.  You might have changed 
'comment-padding' to 0, which is when you get

---- this is a test comment

--library ieee;
--use        ieee.std_logic_1164.all

For this, 'comment-region' doesn't work correctly for languages with 
comment starts that contain 2 of the same characters, like "--" in VHDL 
or "//" in C++. C++-mode doesn't honor the 'comment-padding' option 
though and always inserts "// ", so the problem doesn't occur.

Remedies:

1. Use 1 for 'comment-padding'
2. File a bug report against 'newcomment.el'
3. Make vhdl-mode not honor option 'comment-padding'

Regards,
Reto


On 2020-08-18 13:39, Stefan Kangas wrote:
> Hi,
>
> Reto Zimmermann <reto <at> gnu.org> writes:
>
>> The file is missing.  Could you please re-attach?
> Sorry, it was missing in my reply.
>
> You can find the file here:
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22368#8
>
> Best regards,
> Stefan Kangas

[Message part 2 (text/html, inline)]

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

Previous Next


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