Problem with Comments in Emacs (want them to stop aligning)

Discussion in 'VHDL' started by BlackHelicopter, Sep 5, 2012.

  1. BlackHelicopter

    BlackHelicopter

    Joined:
    Jun 3, 2010
    Messages:
    14
    This has been driving me nuts for a while.. how in the world do I get the comments to stop aligning to each other? (See the notes in the example code below.) All I want to do is leave one space between the code and the comment, that's all. Maybe my Emacs is screwed up?! Anytime I "Beautify" it does this.

    Code:
    library ieee;
    use ieee.std_logic_1164.all;
    use ieee.numeric_std.all;
    
    entity alu is
        port (A   : in  std_logic_vector(7 downto 0);
    	  B   : in  std_logic_vector(7 downto 0);
    	  C   : in  std_logic_vector(7 downto 0);
    	  D   : in  std_logic_vector(7 downto 0);
    	  SEL : in  std_logic_vector(1 downto 0);
    	  F   : out std_logic_vector(7 downto 0));
    end alu;
    
    architecture rtl of alu is
    
    begin
    
        -- comment (this is OK)
        process (A, B, SEL)
    	variable tempo : std_logic_vector(7 downto 0);
        begin
    	case SEL is
    	    when "00" =>		-- output value of A  (want to leave only ONE space between here)
    		F <= A;
    	    when "01" =>		-- output value of B (want to leave only ONE space between here)
    		F <= B;
    	    when "10" =>		-- output value of C (want to leave only ONE space between here)
    		F <= C;
    	    when "11" =>		-- output value of D (want to leave only ONE space between here)
    		F <= D;
    	    when others =>		-- output zeros (want to leave only ONE space between here)
    		F <= (others => '0');
    	end case;
        end process;
    
    end rtl;

    Also.. another funny thing, when I decrease the "Inline Comment Column" and "End Line Comment Column". It seems to work BUT... when I go to update my "Sensitivity List Buffer" it places my arguments in the process sensitivity list on separate lines. i.e.
    process (A,
    B,
    SEL)

    I'm using Emacs v23.3 btw

    Just noticed its also spacing the crap out of my integer := # constant values. It looks like it's trying to align them to the unsigned values. Anyone know who to fix this as well?

    Code:
        -- x, y coordinates (0,0) to (639, 479)
        constant MAX_X                                  : integer              := 640;
        constant MAX_Y                                  : integer              := 480;
        -----------------------------------------
        -- vertical stripe as a wall
        -----------------------------------------
        --- wall left, right boundary
        constant WALL_X_L                               : integer              := 32;
        constant WALL_X_R                               : integer              := 35;
        -----------------------------------------
        -- right vertical bar, paddle
        -----------------------------------------
        -- bar left, right boundary
        constant BAR_X_L                                : integer              := 600;
        constant BAR_X_R                                : integer              := 603;
        -- bar top, bottom boundary
        signal   i_bar_y_t                              : unsigned(9 downto 0);
        signal   i_bar_y_b                              : unsigned(9 downto 0);
        constant BAR_Y_SIZE                             : integer              := 72;
        -- reg to track top boundary (x position is fixed)
        signal   i_bar_y_t_pos_reg, n_bar_y_t_pos_reg   : unsigned(9 downto 0);
        constant BAR_V                                  : integer              := 4;
        -----------------------------------------
        -- square ball
        -----------------------------------------
        constant BALL_SIZE                              : integer              := 8;
    Last edited: Sep 5, 2012
    BlackHelicopter, Sep 5, 2012
    #1
    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. Anonieko

    HttpHandlers - Learn Them. Use Them.

    Anonieko, Jun 15, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    504
    tdavisjr
    Jun 16, 2006
  2. Charles Fox

    Hide comments in emacs python mode?

    Charles Fox, Oct 30, 2007, in forum: Python
    Replies:
    0
    Views:
    562
    Charles Fox
    Oct 30, 2007
  3. why the lucky stiff
    Replies:
    5
    Views:
    130
    why the lucky stiff
    Sep 22, 2004
  4. Adam Funk
    Replies:
    4
    Views:
    214
    Adam Funk
    Jan 29, 2007
  5. bizt
    Replies:
    1
    Views:
    84
    Evertjan.
    Nov 16, 2009
Loading...

Share This Page