它改变
(a b c d (1 2 |3 4) ha ha ha)
Run Code Online (Sandbox Code Playgroud)
成
|(1 2 (a b c d 3 4 ha ha ha))
Run Code Online (Sandbox Code Playgroud)
这种转变有什么用?
fr_*_*lio 12
还有一个关于实际使用的快速添加,您可以查看本教程的1:40分钟:http: //emacsrocks.com/e14.html
叫M-?将光标放在do-something的开头,扩大了let的范围,由此:
(defun my-other-command ()
(when (and (this-predicate)
(that-predicate))
(let ((v (calculate-v))
(x (calculate-x)))
(do-something)
(do-some-more)
(do-a-third-thing))))
Run Code Online (Sandbox Code Playgroud)
直接到这个:
(defun my-other-command ()
(let ((v (calculate-v))
(x (calculate-x)))
(when (and (this-predicate)
(that-predicate))
(do-something)
(do-some-more)
(do-a-third-thing))))
Run Code Online (Sandbox Code Playgroud)
干杯!安德烈斯
严格地说,它用于反转内部表达式的嵌套.
举个例子:
(let [foo bar] (if a b| c))
Run Code Online (Sandbox Code Playgroud)
变
(if a b (let [foo bar]| c))
Run Code Online (Sandbox Code Playgroud)
至于用例,我从来没有具体使用过它,但对于更大的宏来说,它是一个不错的构建块