[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: declare function/macro private
From: |
Lars Ingebrigtsen |
Subject: |
Re: declare function/macro private |
Date: |
Sun, 06 Jun 2021 11:53:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
"Paul W. Rankin" via "Emacs development discussions."
<emacs-devel@gnu.org> writes:
> Given we have a function/macro declare interactive-only property,
> would it be worthwhile to consider a `private' property?
>
> Of course there's already the convention of
> prefix--my-private-function, but my thinking here is that a program
> could declare a function/macro as private, then the compiler could
> signal a warning/error if that function appeared in a library outside
> the library it was defined and declared private.
The compiler could do this with "--" symbols if we wanted to, I guess.
> e.g. in foo.el:
>
> (defun foo-private ()
> (declare (private "use `foo-public' instead."))
> ...)
I'm not necessarily against this or anything, but I do like the "--"
convention, because it makes it very explicit what's internal and what's
not. On the other hand, if we had tagging like this, we could also
make (say) font-lock react to this information and make it as obvious as
the "--" convention.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- 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, 2021/06/06
- 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