@ 字符在 Emacs Lisp 中的作用是什么?
What is the role of the @ character in Emacs Lisp?
例如在这个宏定义中使用:
(defmacro with-eval-after-load-feature (feature &rest body)
(declare (indent 1) (debug t))
(let* ((feature (if (and (listp feature) (eq (car-safe feature) 'quote))
(cdr feature) feature))
(fs (if (listp feature) feature (list feature)))
(form (or (and (eval '(eval-when (compile)
(with-eval-after-load-feature-preload fs)))
'with-no-warnings)
'progn)))
`(,form ,@(with-eval-after-load-feature-transform fs body))))
在 this file.
用于反引号表达式中的拼接。参见 C-h i g (elisp) Backquote RET
。例如:
elisp> `(1 2 ,(list 3 4)) ; no splicing => nested list
(1 2
(3 4))
elisp> `(1 2 ,@(list 3 4)) ; splicing => flat list
(1 2 3 4)
询问 Emacs 始终是一个明智的方法:
- C-hig
(elisp)
RET
- 我
@
RET
这会向您显示 @
的所有 elisp
手册索引条目(其中一个是您实际要查找的 ,@
)。
例如在这个宏定义中使用:
(defmacro with-eval-after-load-feature (feature &rest body)
(declare (indent 1) (debug t))
(let* ((feature (if (and (listp feature) (eq (car-safe feature) 'quote))
(cdr feature) feature))
(fs (if (listp feature) feature (list feature)))
(form (or (and (eval '(eval-when (compile)
(with-eval-after-load-feature-preload fs)))
'with-no-warnings)
'progn)))
`(,form ,@(with-eval-after-load-feature-transform fs body))))
在 this file.
用于反引号表达式中的拼接。参见 C-h i g (elisp) Backquote RET
。例如:
elisp> `(1 2 ,(list 3 4)) ; no splicing => nested list
(1 2
(3 4))
elisp> `(1 2 ,@(list 3 4)) ; splicing => flat list
(1 2 3 4)
询问 Emacs 始终是一个明智的方法:
- C-hig
(elisp)
RET - 我
@
RET
这会向您显示 @
的所有 elisp
手册索引条目(其中一个是您实际要查找的 ,@
)。