Loading ...
Sorry, an error occurred while loading the content.

Re: [jasspa] Align Character's macro

Expand Messages
  • Jon Green
    ... Attached is a cleaned up version which handles regions properly. Not had time to wrap it up for macro calling yet. Note called align-char rather than
    Message 1 of 5 , Dec 1, 2006
    • 0 Attachment
      > If anyone has any fixes for those items or can make the macro better
      > in any way, I'd appriciate it! Oh! One more thing, I'd like to be
      > able to wrap it in other macros and call it with a parameter but am
      > unsure how to do that yet. i.e.

      Attached is a cleaned up version which handles regions properly.
      Not had time to wrap it up for macro calling yet.

      Note called "align-char" rather than "align-character" in keeping with
      the other "-char" commands. Also if you add multiple characters as the
      alignment then any of the characters are aligned vertically.

      Jon.
    • Jon Green
      ... Here http://www.jasspa.com/development/align.emf is a cleaned up version which handles regions properly. Not had time to wrap it up for macro calling yet.
      Message 2 of 5 , Dec 1, 2006
      • 0 Attachment
        Jeremy Cowgar wrote:
        > Attached below is my align-character macro. It's function is:
        >
        > int rad = 10;
        > int speed = 20;
        > int drag = 3;
        >
        > Set the mark at int rad, move to int drag, Esc-x, align-character,
        > it'll prompt for a character, enter =... The result will be:
        >
        > int rad = 10;
        > int speed = 20;
        > int drag = 3;
        >
        > It aligned the = signs.
        >
        > Now, the macro has a few flaws:
        >
        > #1 If the character you want to align starts on the 1 column, it'll
        > be over looked.
        > #2 If you move too far down, say after int drag, and there is no =
        > sign, it'll abort with a end of buffer error.
        > #3 If you have:
        >
        > int rad = 10;
        > int speed = 20;
        > int drag = 3;
        >
        > and align, it'll align to the furthest = sign, so the result would be:
        >
        > int rad = 10;
        > int speed = 20;
        > int drag = 3;
        >
        > If anyone has any fixes for those items or can make the macro better
        > in any way, I'd appriciate it! Oh! One more thing, I'd like to be
        > able to wrap it in other macros and call it with a parameter but am
        > unsure how to do that yet. i.e.
        >

        Here

        http://www.jasspa.com/development/align.emf

        is a cleaned up version which handles regions properly.
        Not had time to wrap it up for macro calling yet.

        Note called "align-char" rather than "align-character" in keeping with
        the other "-char" commands. Also if you add multiple characters as the
        alignment then any of the characters are aligned vertically.

        Jon.

        > define-macro align-equals
        > align-character "="
        > !emacro
        >
        > Jeremy Cowgar
      Your message has been successfully submitted and would be delivered to recipients shortly.