RE: Indentation
"Clementson, Bill" <[email protected]> Wed, 17 Apr 2002 20:52:48 -0600
| Newsgroups | gmane.lisp.ilisp.general |
|---|---|
| Message-ID | <[email protected]> |
> > Put the following in your .emacs to get the indentation in > your 2nd example: > > > > (setq lisp-indent-function 'common-lisp-indent-function) > > Thank you, that did it. > > One other small point: I get these two variants, depending on whether > I have one or several of the arguments/keywords on the same line as > with-open-file. This is the same for defun etc. also. Probably a > trivial setting in .emacs? For some functions who has a very special > first argument the first version is perhaps what some people want? I > think I prefer the last of these two, so I would want the arguments to > line up under the first one always. (Or is there a good reason for the > first of these two?) If you download clisp-indent from the clisp distribution, you can get that type of indentation (and, what some consider better indentation than what is provided by the normal common-lisp-indent-function). It is in the /emacs directory of the distribution. Once you copy it into your load-path, just add the following to your .emacs: (require 'clisp-indent) If you just want to modify the with-open-file indentation, adding the following lines to your .emacs file from clisp-indent should do it for you (not tested): (defmacro defindent (operator indentation) `(put ',operator 'common-lisp-indent-function ',indentation)) (defindent with-open-file ((&whole 4 1 &rest 1) &body)) -- Bill Clementson