emacs vhdl-mode

Discussion in 'VHDL' started by Rick Jackson, Nov 25, 2005.

  1. Rick Jackson

    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, Nov 25, 2005
    #1
    1. Advertising

  2. 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
    Nicolas Matringe, Nov 25, 2005
    #2
    1. Advertising

  3. 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
    Mike Treseler, Nov 26, 2005
    #3
  4. Rick Jackson <> 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]
    Colin Marquardt, Nov 26, 2005
    #4
  5. Rick Jackson

    Rick Jackson Guest

    On Sat, 26 Nov 2005 21:22:41 +0100, Colin Marquardt
    <> wrote:

    >Rick Jackson <> 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, Nov 28, 2005
    #5
  6. 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
    Mike Treseler, Nov 28, 2005
    #6
  7. Rick Jackson

    Rick Jackson Guest

    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, Nov 29, 2005
    #7
  8. Rick Jackson

    Martin Ellis Guest

    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
    Martin Ellis, Nov 29, 2005
    #8
  9. 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
    Mike Treseler, Nov 29, 2005
    #9
  10. Rick Jackson

    Rick Jackson Guest

    On Tue, 29 Nov 2005 14:18:07 +0000, Martin Ellis <>
    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, Nov 29, 2005
    #10
  11. 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)
    Reto Zimmermann, Nov 30, 2005
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    3,469
    Mike Treseler
    Jun 30, 2006
  2. omara007
    Replies:
    0
    Views:
    1,474
    omara007
    Jan 6, 2010
  3. Jeffrey Moss

    eruby mode emacs with mmm-mode

    Jeffrey Moss, Jul 6, 2005, in forum: Ruby
    Replies:
    1
    Views:
    145
    Alan Chen
    Jul 6, 2005
  4. PerlFAQ Server
    Replies:
    1
    Views:
    190
    Marc Girod
    Jan 8, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    163
    PerlFAQ Server
    Apr 12, 2011
Loading...

Share This Page