[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: survey: indentation declaration style
From: |
Linas Vepstas |
Subject: |
Re: survey: indentation declaration style |
Date: |
Mon, 11 May 2009 12:27:07 -0500 |
Hi,
2009/5/11 Thien-Thi Nguyen <address@hidden>:
> I've tentatively adopted the following indentation declaration style.
I do something similar, except that, for clauses that
do not fit on one line, I put the closing paren on a
new line. This allows for much easier visual
inspection; also, I find it easier to read code that
has a fair amount of white-space in it; I have visual
problems reading dense, blackletter gothic coding
styles. This may be because I skim much more
than I read, and blackletter impedes skimming.
Also I use tabs for indentation. (you can set tab-stops
as you wish)
So for example:
(defun ttn-scheme-set-macro-indentation ()
(save-excursion
(goto-char (point-min))
(while (re-search-forward
(concat
"^(def\\S-+\\Sw+\\(\\S-+\\)[^\n]+\n"
;; TODO: parameterize
" ;;#;(declare (indent \\(.\\)")
nil t
)
(put (intern (match-string 1))
'scheme-indent-function
(string-to-number (match-string 2)
)
)
)
)
)
--linas