emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: declare function/macro private


From: Tassilo Horn
Subject: Re: declare function/macro private
Date: Sun, 06 Jun 2021 20:12:49 +0200
User-agent: mu4e 1.5.13; emacs 28.0.50

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I think the "--" convention actually includes an extra information
> compared to yours which could be useful here: we could warn for uses
> of "foo--" if and only if the use appears in something whose name
> doesn't start with "foo-".
>
> IOW, use the string before the "--" as the definition of the "library"
> (so that would support cases where a library is spread over several
> files, as well as the case where a single file contains "internal
> libraries").

If my package was structured like

  foo.el
  foo-search.el
  foo-parse.el

I'd find it quite natural to name a private function in foo-search.el
`foo-search--do-stuff'.  Of course, it's ok if my `foo-base-do-stuff'
function from foo.el calls it but it would trigger a warning with your
approach because the "library" would be foo-search, no?

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]