Lambda 在elisp中,下划线(u)是什么意思?

Lambda 在elisp中,下划线(u)是什么意思?,lambda,emacs,elisp,naming-conventions,Lambda,Emacs,Elisp,Naming Conventions,我正在审查emacs包中的neotree包代码。 我不知道下面宏定义中下划线(\)的含义 (lambda(&rest)) 宏的完整定义如下 (defmacro neotree-make-executor (&rest fn-form) "Make an open event handler, FN-FORM is event handler form." (let* ((get-args-fn (lambda (sym) (or (plist-get fn-f

我正在审查emacs包中的neotree包代码。 我不知道下面宏定义中下划线(\)的含义

(lambda(&rest))

宏的完整定义如下

(defmacro neotree-make-executor (&rest fn-form)
  "Make an open event handler, FN-FORM is event handler form."
  (let* ((get-args-fn
          (lambda (sym) (or (plist-get fn-form sym) (lambda (&rest _)))))
         (file-fn (funcall get-args-fn :file-fn))
         (dir-fn (funcall get-args-fn :dir-fn)))
    `(lambda (&optional arg)
       (interactive "P")
       (neo-global--select-window)
       (neo-buffer--execute arg ,file-fn ,dir-fn))))

下划线是有效的符号名称。字节编译器的惯例是,未使用的参数名称应以下划线开头,以避免编译期间出现“未使用的词汇变量”警告。

请参阅

11.9.4使用词汇绑定

lexical-binding [Variable]
    If this buffer-local variable is non-nil, Emacs Lisp files and buffers are evaluated
    using lexical binding instead of dynamic binding. (However, special variables are still
    dynamically bound; see below.) If nil, dynamic binding is used for all local variables.
    This variable is typically set for a whole Emacs Lisp file, as a file local variable (see
    Section 11.11 [File Local Variables], page 163). Note that unlike other such variables,
    this one must be set in the first line of a file.
(To silence byte-compiler warnings about unused variables, just use a variable name that
start with an underscore. The byte-compiler interprets this as an indication that this is a
variable known not to be used.)