[Top][All Lists]

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

Re: Getting lisp 'with' macros to indent correctly

From: Pascal J. Bourguignon
Subject: Re: Getting lisp 'with' macros to indent correctly
Date: Wed, 18 Feb 2009 15:32:33 +0100
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.2 (gnu/linux)

address@hidden writes:

> I'm not sure if the indentation package changed, but forms like this:
> (with-foo ()
>   (bar))
> used to indent 'bar' correctly.  Now the 'bar' sexp is lined up with
> the arglist for 'with-foo'.  This should be a simple setting, but I
> can't seem to find it.  Would someone point me in the right
> direction?  Thanks!

Perhaps you're not in the right lisp mode?  

Otherwise, you can specify what indenting to do for new macros with:

   (put 'NEW-MACRO 'lisp-indent-function N)

N being the number of forms to indent "specially", in your case, it would be 1.

   (put 'with-foo 'lisp-indent-function 1) 

You can put these forms at the end of your sources:

;; Local Variables:
;; eval: (put 'with-foo 'lisp-indent-function 1) 
;; End:

__Pascal Bourguignon__

reply via email to

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