在Emacs Lisp中,函数名称中的双减( - )约定是什么意思 [英] What does the double minus (--) convention in function names mean in Emacs Lisp

查看:118
本文介绍了在Emacs Lisp中,函数名称中的双减( - )约定是什么意思的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读一些Emacs Lisp软件包,并且遇到了一些正在声明的功能的公约 - 在库前缀之后,例如:

 (defun eproject  -  combine-regexps(regexp-list)

我想知道如果这是一个向图书馆声明私有功能的约定,但到目前为止,我还没有在Emacs编码指南中找到任何内容。

解决方案

Emacs对命名空间,软件包,库或模块没有任何支持,因此Emacs源使用 foo - 作为 foo 库,在某些情况下 foo - 用于应该是内部的绑定。


I've been reading through a number of Emacs Lisp packages and have come across the convention of some functions being declared with -- after the library prefix, e.g.:

(defun eproject--combine-regexps (regexp-list)

I'm wondering if this a convention for declaring "private" functions to the library but so far I haven't found anything in the Emacs Coding guidelines.

解决方案

Emacs doesn't have any support for namespaces, packages, libraries or modules. Emacs sources therefore use foo- as a prefix for a foo library, and in some cases foo-- is used for bindings that are supposed to be internal.

这篇关于在Emacs Lisp中,函数名称中的双减( - )约定是什么意思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆