问题描述
在clojure模式emacs缩进我的半冒号注释5选项卡。即使它是空文件中的第一行,也会发生这种情况。
例如,打开一个clojure文件,输入;
/ div>
这是正常的行为。在您的情况下,您需要两个分号(;;)。
从 - 第41页:
这些注释提示是为emacs lisp编写的,但它们对于所有语句都是相同的:
(setq base-version-list;有一个基础
(assoc(substring fn 0 start-vn);版本
file-version-assoc-list));这看起来像
;一个subversion
;
;
;
;再次,
;这是内联注释
;;两个分号注释
;;对齐到与代码相同的缩进水平
In clojure-mode emacs is indenting my semi colon comments with 5 tabs. Even if it is the first line in an empty file this occurs.
Eg just open up a clojure file, enter ; at the first character and press tab.
I'm using version 1.7.1
That's normal behavior. In your case you want two semicolons (;;).
From Tutorial on Good Lisp Programming Style by Peter Norvig (pdf) -- page 41:
These comment tips are written for emacs lisp, but they are the same for all lisps: 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
这篇关于评论缩进似乎在clojure模式搞乱了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!