emacs vhdl-mode

R

Rick Jackson

I've got a problem with comments in vhdl-mode: I can't justify comment
blocks. If I M-Q in a comment block, then the block does justify, but
the '--' characters are treated as part of the comment, and end up
*inside* the block, instead of at the line start.

Any idea how to re-justify comments? I'm 0n v3.32.20.

Thanks

Rick
 
N

Nicolas Matringe

Rick Jackson a écrit:
I've got a problem with comments in vhdl-mode: I can't justify comment
blocks. If I M-Q in a comment block, then the block does justify, but
the '--' characters are treated as part of the comment, and end up
*inside* the block, instead of at the line start.
Any idea how to re-justify comments? I'm 0n v3.32.20.

Try to update. I'm using v3.33.5 and it seems to work fine.
(http://opensource.ethz.ch/emacs/vhdl-mode-3.33.5.tar.gz or
http://opensource.ethz.ch/emacs/vhdl-mode-3.33.5.zip)

Nicolas
 
M

Mike Treseler

Rick said:
I've got a problem with comments in vhdl-mode: I can't justify comment
blocks. If I M-Q in a comment block, then the block does justify, but
the '--' characters are treated as part of the comment, and end up
*inside* the block, instead of at the line start.

Hmm. Works fine here.
Try Alt-x vhdl-mode to verify the mode is on.

-- Mike Treseler
 
C

Colin Marquardt

Rick Jackson said:
I've got a problem with comments in vhdl-mode: I can't justify comment
blocks. If I M-Q in a comment block, then the block does justify, but
the '--' characters are treated as part of the comment, and end up
*inside* the block, instead of at the line start.

Any idea how to re-justify comments? I'm 0n v3.32.20.

First thing would be to upgrade as Nicolas mentioned.

Reto Zimmermann (the vhdl-mode maintainer) told me that it works for
him with comments with the same indentation and fails like you
describe if this is not so. *If* you have equal indentation and it
still fails, he asks you to send him a testcase (there is a "Report
Bug" menu item).

Cheers,
Colin
 
R

Rick Jackson

First thing would be to upgrade as Nicolas mentioned.

Reto Zimmermann (the vhdl-mode maintainer) told me that it works for
him with comments with the same indentation and fails like you
describe if this is not so. *If* you have equal indentation and it
still fails, he asks you to send him a testcase (there is a "Report
Bug" menu item).

Still fails on 3.33.5. All my comments have the same indentation, so
that's not the problem. Not sure about sending a test case - it would
be, ummm, a big comment... :)

My first guess was that the problem was in my .emacs, which I've been
hacking for years. I've deleted everything except load-path, but this
doesn't fix the problem.

This presumably only leaves the emacs version - I'm on Xemacs 21.4.15.
One interesting point is that multi-line comments justify correctly in
c++-mode, with exactly the same xemacs version and .emacs, and I
imagine that the same code is used in vhdl-mode.

Cheers -

Rick
 
M

Mike Treseler

Rick said:
Still fails on 3.33.5. All my comments have the same indentation, so
that's not the problem. Not sure about sending a test case - it would
be, ummm, a big comment... :)

Consider posting some small before and
after text blocks that demonstrate the problem.
This presumably only leaves the emacs version - I'm on Xemacs 21.4.15.

Could be. Have a look at this:
http://groups.google.com/groups?q=xemacs+vhdl-mode+turnbull+forward-comment

I'm using:
GNU Emacs 21.3.1
(i586-suse-linux, X toolkit, Xaw3d scroll bars)
of 2004-04-05 on gray

GNU emacs on linux is very stable
and has good newsgroup support.


-- Mike Treseler
 
R

Rick Jackson

It's not an indenting problem - it appears to be an autofill problem
of some sort. If I turn on c++-mode, set fill-column to 10, and type

// the quick brown
// fox jumps

and then hit M-q in the comment block, I get

// the
// quick
// brown
// fox
// jumps

as expected. However, if I set vhdl-mode, and type

-- the quick brown
-- fox jumps

and then hit M-q in the comment block, I get

-- the
quick
brown --
fox jumps

as unexpected. The fact that the C++ version works sort of points,
given my minimal knowledge of such things, to a problem in vhdl-mode
itself.

Rick
 
M

Martin Ellis

Rick said:
if I set vhdl-mode, and type

-- the quick brown
-- fox jumps

and then hit M-q in the comment block, I get

-- the
quick
brown --
fox jumps

FWIW, it works fine on here on
Emacs 21.4.1, vhdl-mode 3.29

but not on
XEmacs 21.4, vhdl-mode 3.33.2

A VHDL mode regression? An XEmacs incompatibility? Don't know.


Martin
 
M

Mike Treseler

Rick said:
as unexpected. The fact that the C++ version works sort of points,
given my minimal knowledge of such things, to a problem in vhdl-mode
itself.

Perhaps, but Martin's evidence suggests
that this bug affects xemacs, not emacs.
Your workaround is to live with it or
switch to emacs.

-- Mike Treseler
 
R

Rick Jackson

FWIW, it works fine on here on
Emacs 21.4.1, vhdl-mode 3.29

but not on
XEmacs 21.4, vhdl-mode 3.33.2

A VHDL mode regression? An XEmacs incompatibility? Don't know.

The latter, it seems. Reto's aware of this - he mailed me a vhdl-mode
patch today, and I'm hoping to try it out a bit later. It only affects
xemacs, as you've found.

Rick
 
R

Reto Zimmermann

Rick said:
as unexpected. The fact that the C++ version works sort of points,
given my minimal knowledge of such things, to a problem in vhdl-mode
itself.

c/c++-mode uses it's own function for comment filling. vhdl-mode uses
the standard fill-paragraph function for this purpose. In GNU Emacs it
works as is, but in XEmacs it obviously needs the variable fill-prefix
to be defined. I'm going to make this change in vhdl-mode as soon as
I'm sure it doesn't break anything else.

Reto (finally with news-group access again)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top