emacs vhdl-mode

R

Rick Jackson

Guest
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
 
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
 
Rick Jackson wrote:
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
 
Rick Jackson <nospam@nospam.com> writes:

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

--
I have made great efforts in ensuring correctness in the distributed
protocol. I have the coffee rings on my desk to prove it.
[Sunir Shah in http://www.jabber.org/?oid=1026]
 
On Sat, 26 Nov 2005 21:22:41 +0100, Colin Marquardt
<colin@marquardt-home.de> wrote:

Rick Jackson <nospam@nospam.com> writes:

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).
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
 
Rick Jackson wrote:

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
 
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
 
Rick Jackson wrote:

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
 
Rick Jackson wrote:

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
 
On Tue, 29 Nov 2005 14:18:07 +0000, Martin Ellis <me_ncl@hotmail.com>
wrote:

Rick Jackson wrote:

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.
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
 
Rick Jackson wrote:

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)
 

Welcome to EDABoard.com

Sponsor

Back
Top