all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Suraj Acharya <sacharya@bea.com>
Subject: Re: correct indentation for flet and labels macros
Date: Mon, 30 Aug 2004 20:00:05 -0700	[thread overview]
Message-ID: <ch0pje$85t$1@sea.gmane.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0408302029150.31548-100000@x-mail.lanl.gov>

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

  reply	other threads:[~2004-08-31  3:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31  2:26 correct indentation for flet and labels macros Suraj Acharya
2004-08-31  2:45 ` Davis Herring
2004-08-31  3:00   ` Suraj Acharya [this message]
2004-08-31  9:44     ` Andreas Schwab
2004-09-01  2:06       ` Suraj Acharya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ch0pje$85t$1@sea.gmane.org' \
    --to=sacharya@bea.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.