Indentation

One More Indentation Hack

Here’s yet another indentation hack that I came up with recently. All the work done by Nikodemus on the Slime indentation contrib is pretty cool, especially the notion of indentation style (though I wish the styles were Custom variables, but that is another story). I tend to use indentation styles for global, maybe collaborative preferences, but on several occasions however, I find that this approach has a couple of drawbacks.

Jul 20, 2011

Common Lisp indentation in Emacs

Update: since the original publication of this article, Nikodemus Siivola and I have done some more work on various other aspects of Common Lisp indentation, and I must say that the result is pretty satisfactory. Nikodemus has merged all the changes into Slime, and I have done so for XEmacs. If you’re an XEmacs user, you don’t need to use the slime-indentation contrib to get these improvements. Simply upgrade the “prog-modes” package and load cl-indent.el.

May 6, 2011

CCL Objective-C Bridge Code Indentation

A whole bunch of CCL Cocoa coding involves calls to Objective-C methods. For instance, the following Objective-C code: [cell drawWithFrame: frame inView: view]; will translate into this in CLL: (#/drawWithFrame:inView: cell frame view) Indeed, Objective-C is designed around the record-based model (methods belong to classes), so the cell object receives the drawWithFrame:inView: message via its Smalltalk descendant syntax. On the other hand, the Lisp translation involves a generic function call with the usual funcall syntax. The dispatch occurs on the first argument (the cell), and the rest is actual arguments to the message.

Jul 1, 2008