在 clojure 模式下,emacs 用 5 个选项卡缩进我的分号注释。即使它是空文件中的第一行也会发生这种情况。
例如,只需打开一个 clojure 文件,输入 ;在第一个字符处并按 Tab 键。
我使用的是1.7.1版本
这是正常行为。在您的情况下,您需要两个分号(;;)。
从教程开始Peter Norvig 的《Good Lisp 编程风格》(pdf) http://www.cs.umd.edu/~nau/cmsc421/norvig-lisp-style.pdf-- 第 41 页:
遵守评论约定:
- ;对于内联评论
- ;;对于功能内注释
- ;;;用于函数间注释
- ;;;;对于节标题(对于大纲模式)
这些注释提示是为 emacs lisp 编写的,但它们对于所有 lisp 都是相同的:http://www.gnu.org/s/emacs/manual/html_node/elisp/Comment-Tips.html http://www.gnu.org/s/emacs/manual/html_node/elisp/Comment-Tips.html
(setq base-version-list ; there was a base
(assoc (substring fn 0 start-vn) ; version to which
file-version-assoc-list)) ; this looks like
; a subversion
;
;
;
; again,
; this is inline comment
;; two semicolon comment
;; aligned to the same level of indentation as the code
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)