【发布时间】:2011-12-28 23:59:56
【问题描述】:
Emacs 以下列方式自动缩进 Clojure 代码:
(defn foo [x]
(if (= 0 x)
0
1))
我希望它像 Scheme 和 CL 那样做:
(defn foo [x]
(if (= 0 x)
0
1))
如何更改我的 .el 文件以实现此目的?
【问题讨论】:
-
我也不喜欢这种缩进样式。我认为 Lisps 中的缩进应该是语法级别的,而不是语义级别的,即始终与上面的项目对齐。 (但我可能是唯一的)
-
这是个人喜好的事情,但我非常建议你习惯第一个。这是 Clojure 社区的其他成员使用的。
标签: emacs clojure common-lisp auto-indent