9 Jun 2011 nikodemus   » (Journeyer)

Slime-Indentation and Names Styles

Slime's slime-indentation contrib now also provides support for named indentation styles. Add a line like this to source files to specify a style:

;; -*- common-lisp-style: modern -*-

Predefined styles are: basic, classic, modern, and sbcl. See C-h v common-lisp-style for more details.

You can also define your own styles:

;;; in .emacs, after slime-setup.
(define-common-lisp-style "personal"
   "My own eccentric style."
   (:variables
     (lisp-lambda-list-keyword-alignment t)
     (lisp-lambda-list-keyword-parameter-alignment nil)
     (lisp-loop-indent-forms-like-keywords t))
   (:indentation
     (if (4 2 2))))

See C-h f define-common-lisp-style for details.

If you define a style for use in the source-files of an open source project, please consider submitting it for inclusion.

Ps. in case you're wondering, you can gain access to all these goodies and more by adding slime-indentation to your slime-setup call:

;; Maybe slime-indentation will be part of slime-fancy at some
;; point, but it isn't yet.
(slime-setup '(slime-fancy slime-indentation))

Syndicated 2011-06-09 16:08:35 from Nikodemus Siivola

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!