I have my own way of indenting Lisp code along with supporting Emacs commands that I have been using for the last 9 years.
Here is an example, which I chose by picking a file of my code at random, then scanning it till (after scanning about 80 lines) I found the first fragment that is clearly indented differently than how a normal Lisp programmer would indent it:
The standard way of indenting Emacs Lisp code has the number of spaces to indent being dependent on the "main operator" of the form being indented. For example, if the "main operation" is `cond` then the cond clauses are indented only once space more than the cond form itself is. Probably the reason Emacs programmers have settled on using only one space to indent the arguments of a cond form is that they have found that they run out of room if they make it larger than 1. I have a different way of avoiding (or rather postponing) running out of room with the result that I am able to adopt a rule that everything gets indented 5 spaces, which makes it easier to use my visual cortex to tell which lines are at the same level of indentation.
This next is not valid lisp (or more precisely you would never actually write it):
((((((((((((((((((((((((((foo
bar
bash))))))))))))))))))))))))))
But if it were valid, then it would be correctly indented according to my way. The main value I get out my way of indenting is that if `bar` or `bash` were many lines long, then there could be more levels of indentation internal to `bar` or `bash` compared to the usual way of doing indentation. I.e., my way lets me conserve levels of indentation, so I can write larger defuns without any individual line being longer than my self-imposed limit (which happens to be be 80 columns) and without indenting anything by less than 5 spaces.
In exchange for being able to handle multiple open parens with only one level of indentation, I have to impose a rule that when I close one of those open parens, I have to close all of them. (I have Emacs signal an error by making a sound when I attempt to indent a line that disobeys that rule.)
So for example this next is illegal in my indentation method:
Here is an example, which I chose by picking a file of my code at random, then scanning it till (after scanning about 80 lines) I found the first fragment that is clearly indented differently than how a normal Lisp programmer would indent it:
The standard way of indenting Emacs Lisp code has the number of spaces to indent being dependent on the "main operator" of the form being indented. For example, if the "main operation" is `cond` then the cond clauses are indented only once space more than the cond form itself is. Probably the reason Emacs programmers have settled on using only one space to indent the arguments of a cond form is that they have found that they run out of room if they make it larger than 1. I have a different way of avoiding (or rather postponing) running out of room with the result that I am able to adopt a rule that everything gets indented 5 spaces, which makes it easier to use my visual cortex to tell which lines are at the same level of indentation.This next is not valid lisp (or more precisely you would never actually write it):
But if it were valid, then it would be correctly indented according to my way. The main value I get out my way of indenting is that if `bar` or `bash` were many lines long, then there could be more levels of indentation internal to `bar` or `bash` compared to the usual way of doing indentation. I.e., my way lets me conserve levels of indentation, so I can write larger defuns without any individual line being longer than my self-imposed limit (which happens to be be 80 columns) and without indenting anything by less than 5 spaces.In exchange for being able to handle multiple open parens with only one level of indentation, I have to impose a rule that when I close one of those open parens, I have to close all of them. (I have Emacs signal an error by making a sound when I attempt to indent a line that disobeys that rule.)
So for example this next is illegal in my indentation method:
To make it legal I have to write it like this: