From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Treseler Newsgroups: gmane.emacs.help Subject: Re: Custom indentation in Emacs Vhdl-mode Date: Fri, 12 Jan 2007 09:51:03 -0800 Message-ID: <50q047F1haip3U1@mid.individual.net> References: <1168527687.560869.42360@k58g2000hse.googlegroups.com> <3k2fq2l3lgvcfe7t45o1binaef0872p5ok@4ax.com> <50polbF1grf3jU1@mid.individual.net> <1168621500.477449.295080@l53g2000cwa.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1168627249 23286 80.91.229.12 (12 Jan 2007 18:40:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Jan 2007 18:40:49 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 12 19:40:46 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H5RKQ-0003Xp-4a for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Jan 2007 19:40:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H5RKQ-0004Ek-2d for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Jan 2007 13:40:38 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: comp.lang.vhdl,comp.gnu.emacs.help,gnu.emacs.help Original-Lines: 20 Original-X-Trace: individual.net J9pIzWAyMyDjOEhgx5rj0AKemyORUmgyULjMc1iEDZOp9qBLqL User-Agent: Thunderbird 1.5.0.9 (X11/20060911) In-Reply-To: <1168621500.477449.295080@l53g2000cwa.googlegroups.com> Original-Xref: shelby.stanford.edu comp.lang.vhdl:65082 gnu.emacs.help:144659 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40263 Archived-At: 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. )