From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Suraj Acharya Newsgroups: gmane.emacs.devel Subject: Re: correct indentation for flet and labels macros Date: Mon, 30 Aug 2004 20:00:05 -0700 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1093921244 8551 80.91.224.253 (31 Aug 2004 03:00:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Aug 2004 03:00:44 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 31 05:00:36 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C1yst-0003kt-00 for ; Tue, 31 Aug 2004 05:00:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C1yxj-0007KS-P0 for ged-emacs-devel@m.gmane.org; Mon, 30 Aug 2004 23:05:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C1yxc-0007KN-Rr for emacs-devel@gnu.org; Mon, 30 Aug 2004 23:05:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C1yxb-0007KB-BH for emacs-devel@gnu.org; Mon, 30 Aug 2004 23:05:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C1yxb-0007K8-8n for emacs-devel@gnu.org; Mon, 30 Aug 2004 23:05:27 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C1ysL-0005OF-SF for emacs-devel@gnu.org; Mon, 30 Aug 2004 23:00:02 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1C1ysL-0000Vr-00 for ; Tue, 31 Aug 2004 05:00:01 +0200 Original-Received: from 63.96.165.58 ([63.96.165.58]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Aug 2004 05:00:01 +0200 Original-Received: from sacharya by 63.96.165.58 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Aug 2004 05:00:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 43 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 63.96.165.58 User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26635 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26635 Davis Herring wrote: >>Is there any way to get flet and labels to indent their definitions like >>defun? > > > It looks like you used tabs (of unknown width) that got converted to some > other width, so it's hard to say what you really want. But that's not > actually relevant: the problem is that the thing controlling the > indentation of (bar) is actually `foo', since it's the function name in > that sexp. However, you can probably do something deep and dark with > > (put 'flet 'lisp-indent-hook 'indent-flet) > (defun indent-flet (state indent-point) ...) > > But beyond that all I know is to read the source for > `calculate-lisp-indent', `lisp-indent-defform', and friends. > > Davis Herring > I'm sorry, and besides foo was probably too short a name to show the difference well anyways. Here's what I meant: I'd like to get (flet ((really-long-function-name (args) (bar))) instead of (flet ((really-long-function-name (args) (bar))) The latter is the behavior is would get from let, but since the arguments are special for flet and labels it would be nice the former. How does defun get its special indentation for example ? Perhaps I can adapt that code. Suraj