What does the double minus (--) convention in func

2019-02-16 04:11发布

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.

2条回答
戒情不戒烟
2楼-- · 2019-02-16 04:49

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.

查看更多
ゆ 、 Hurt°
3楼-- · 2019-02-16 04:54

There is really no such thing as "internal" for Emacs. But yes, some programmers have adopted this convention to indicate things that are more internal -- meaning essentially that there will be less (or no) hesitation by implementors to change them. It's a way of letting users of the code be aware of this possible volatility.

查看更多
登录 后发表回答