unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Reto Zimmermann <reto@gnu.org>
To: Stefan Kangas <stefan@marxist.se>, John Chapple <jrchapple@sympatico.ca>
Cc: "22368@debbugs.gnu.org" <22368@debbugs.gnu.org>
Subject: bug#22368: Another way to produce the same result
Date: Wed, 19 Aug 2020 13:52:22 +0200	[thread overview]
Message-ID: <a664b307-ef83-4d99-6a6a-c42e729fa688@gnu.org> (raw)
In-Reply-To: <CADwFkmmyPJf1ppWGM4pCQRdyXsNWeOXPiYwM4Avd3TROQEC2_g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 2276 bytes --]

  reply	other threads:[~2020-08-19 11:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14  0:12 bug#22368: vhdl comment-uncomment problem, apparently (or not) related to 14335 and 5997 John Chapple
2016-01-14 17:10 ` bug#22368: Another way to produce the same result John Chapple
2020-08-15  5:34   ` Stefan Kangas
2020-08-18 10:43     ` Reto Zimmermann
2020-08-18 11:39       ` Stefan Kangas
2020-08-19 11:52         ` Reto Zimmermann [this message]
2021-12-02  8:48           ` bug#22368: vhdl comment-uncomment problem, apparently (or not) related to 14335 and 5997 Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a664b307-ef83-4d99-6a6a-c42e729fa688@gnu.org \
    --to=reto@gnu.org \
    --cc=22368@debbugs.gnu.org \
    --cc=jrchapple@sympatico.ca \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).