What is the role of the @ character in Emacs Lisp?

前端 未结 2 1430
梦谈多话
梦谈多话 2021-01-19 03:51

As used for instance in this macro definition:

(defmacro with-eval-after-load-feature (feature &rest body)
  (declare (indent 1) (debug t))
  (let* ((fea         


        
2条回答
  •  广开言路
    2021-01-19 04:24

    It's used for splicing in backquoted expressions. See C-h i g (elisp) Backquote RET. For example:

    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)
    

提交回复
热议问题