comp.gnu.emacs.help
  Home FAQ Contact Sign in
comp.gnu.emacs.help only
 
Advanced search
January 2007
motuwethfrsasuw
1234567 1
891011121314 2
15161718192021 3
22232425262728 4
293031     5
2007
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2007      
total
comp.gnu.emacs.help Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Re: Custom indentation in Emacs Vhdl-mode         


Author: Mike Treseler
Date: Jan 12, 2007 09:51

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.
)
no comments