什么`@`在elisp中意味着什么?

时间:2015-12-09 02:57:51

标签: emacs elisp

这很可能是一个愚蠢的问题,但是我没有看到我读过的elisp中的@符号,并且想知道它意味着什么(前面有一个, as好的)code?我认为提供正确的搜索短语有些困难。

如果链接腐烂:

(defmacro zenburn-with-color-variables (&rest body)
  "`let' bind all colors defined in `zenburn-colors-alist' around BODY.
Also bind `class' to ((class color) (min-colors 89))."
  (declare (indent 0))
  `(let ((class '((class color) (min-colors 89)))
         ,@(mapcar (lambda (cons)
                     (list (intern (car cons)) (cdr cons)))
                   zenburn-colors-alist))
     ,@body))

2 个答案:

答案 0 :(得分:1)

这是一个elisp宏定义,它定义了一个模板,用于在编译时由其他代码替换的代码。一个体面的介绍是Paul Graham的第7章 On Lisp

http://www.paulgraham.com/onlisptext.html

答案 1 :(得分:1)

通过检查elisp手册的索引来询问Emacs:

  • C-h i g (elisp) RET
  • I @ RET

关注结果:* ,@ (with backquote) [Index]: Backquote. (line 29)

You can also "splice" an evaluated value into the resulting list,
using the special marker ‘,@’.  The elements of the spliced list become
elements at the same level as the other elements of the resulting list.
The equivalent code without using ‘`’ is often unreadable.  Here are
some examples:
[...]