[Top][All Lists]

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

Re: correct indentation for flet and labels macros

From: Suraj Acharya
Subject: Re: correct indentation for flet and labels macros
Date: Mon, 30 Aug 2004 20:00:05 -0700
User-agent: Mozilla Thunderbird 0.7.1 (Windows/20040626)

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)

instead of

(flet ((really-long-function-name (args)

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.


reply via email to

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