[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Custom indentation in Emacs Vhdl-mode
From: |
haws |
Subject: |
Re: Custom indentation in Emacs Vhdl-mode |
Date: |
12 Jan 2007 09:58:27 -0800 |
User-agent: |
G2/1.0 |
Ok, thanks! I guess that solution will do!
I thought I'd have to change the syntactic meaning of "use", but
vhdl-mode is kinda complicated (20k lines), so I probably don't want to
mess there anyway :)
Mike Treseler escreveu:
> Hugo wrote:
> > So, any ideas on how to indent the use's relative to "library ieee" ? I
> > know it's pretty silly thing...
> >
> > The only way I know to accomplish that would be a post-beautifier
> > function that fixes those lines.. but this sounds rather ugly... :)
>
> Since I hijacked your thread, here's an idea.
>
> Yes. If you look at the source for vhdl-beautify-buffer you will
> see that it is pretty tightly wound. I would write a
> wrapper function called vhdl-align-use that would
> call beautify then find the first USE, insert three spaces, etc.
> Something like:
>
> (defun align-use () "Indent vhdl use clauses"
> (vhdl-beautify-buffer)
> (beginning-of-buffer)
> ;;code to search for "use" lines and insert three spaces goes here.
> )