From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "haws" Newsgroups: gmane.emacs.help Subject: Re: Custom indentation in Emacs Vhdl-mode Date: 12 Jan 2007 09:58:27 -0800 Organization: http://groups.google.com Message-ID: <1168624707.414984.208870@l53g2000cwa.googlegroups.com> References: <1168527687.560869.42360@k58g2000hse.googlegroups.com> <3k2fq2l3lgvcfe7t45o1binaef0872p5ok@4ax.com> <50polbF1grf3jU1@mid.individual.net> <1168621500.477449.295080@l53g2000cwa.googlegroups.com> <50q047F1haip3U1@mid.individual.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1168627277 23381 80.91.229.12 (12 Jan 2007 18:41:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Jan 2007 18:41:17 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 12 19:41:16 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 1H5RKx-0003fw-95 for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Jan 2007 19:41:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H5RKx-0004o9-20 for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Jan 2007 13:41:11 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!postnews.google.com!l53g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: comp.lang.vhdl,gnu.emacs.help Original-Lines: 29 Original-NNTP-Posting-Host: 201.21.235.16 Original-X-Trace: posting.google.com 1168624719 17195 127.0.0.1 (12 Jan 2007 17:58:39 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 12 Jan 2007 17:58:39 +0000 (UTC) In-Reply-To: <50q047F1haip3U1@mid.individual.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 fw.datacom-telematica.com.br:3128 (squid/2.5.STABLE6) Complaints-To: groups-abuse@google.com Injection-Info: l53g2000cwa.googlegroups.com; posting-host=201.21.235.16; posting-account=pG57fA0AAADtQ-4h1MyvjXjZpSNZC0zj Original-Xref: shelby.stanford.edu comp.lang.vhdl:65083 gnu.emacs.help:144660 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:40264 Archived-At: 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. > )