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

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

bug#22368: Another way to produce the same result


From: Reto Zimmermann
Subject: bug#22368: Another way to produce the same result
Date: Wed, 19 Aug 2020 13:52:22 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

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@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


reply via email to

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