[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
- declare function/macro private, Paul W. Rankin, 2021/06/06
- Re: declare function/macro private, Stefan Monnier, 2021/06/06
- Re: declare function/macro private,
Tassilo Horn <=
- Re: declare function/macro private, Stefan Monnier, 2021/06/06
- Re: declare function/macro private, Paul W. Rankin, 2021/06/06
- Re: declare function/macro private, Arthur Miller, 2021/06/06
- Re: declare function/macro private, Paul W. Rankin, 2021/06/06
- Re: declare function/macro private, Arthur Miller, 2021/06/07
Re: declare function/macro private, Paul W. Rankin, 2021/06/06