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)

干杯!安德烈斯


She*_*tJS 6

严格地说,它用于反转内部表达式的嵌套.

举个例子:

(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)

至于用例,我从来没有具体使用过它,但对于更大的宏来说,它是一个不错的构建块