help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom indentation in Emacs Vhdl-mode


From: Mike Treseler
Subject: Re: Custom indentation in Emacs Vhdl-mode
Date: Fri, 12 Jan 2007 09:51:03 -0800
User-agent: Thunderbird 1.5.0.9 (X11/20060911)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]