Lisp HUG Maillist Archive

default indents

I'm stumped as to why the default indentation of macros is arbitrarily 
different. For example:

(let-connection ()
   (test 1234))

(let-connection2 ()
                  (test 134))


I can fix let-connection2 by adding an entry in my init file for 
editor:setup-indent, but I hate to do that every time I create a macro. 
Is there some way to globally specify this?

Thanks,

John DeSoi, Ph.D.


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

Re: default indents

> From: "John DeSoi" <jd@icx.net>
> To: <lisp-hug@xanalys.com>
> Sent: Thursday, July 10, 2003 3:34 PM
> Subject: default indents
>
> I'm stumped as to why the default indentation of macros is
arbitrarily
> different. For example:
>
> (let-connection ()
>    (test 1234))
>
> (let-connection2 ()
>                   (test 134))
>
>
> I can fix let-connection2 by adding an entry in my init file for
> editor:setup-indent, but I hate to do that every time I create a
macro.
> Is there some way to globally specify this?
>
> Thanks,
>
> John DeSoi, Ph.D.


If a macro's argument list includes &BODY, the indentation is
affected. For example:

(defmacro foo (() x)
  `,x)

(defmacro foo2 (() &body body)
  `(progn ,@body))

(foo ()
     2)

(foo2 ()
  2)

Does that help?

BTW, the macro must be compiled for &BODY to cause the nice
indentation to happen. (This looks like a bug.)



________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

Re: default indents

Unable to parse email body. Email id is 1214

Updated at: 2020-12-10 09:00 UTC