help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Working with constansts


From: Nikolaj Schumacher
Subject: Re: Working with constansts
Date: Tue, 12 May 2009 11:46:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (darwin)

Decebal <CLDWesterhof@gmail.com> wrote:

> But if I make a library and distribute it, the receiver could -
> unwittingly- change it. But the idea of using '+' to put before and
> after the variable name is a good one. I'll do that.

What about your internal variables?  The user is probably not supposed
to unwittingly change them, either.  So the problem isn't limited to
constants.  It's Elisp's complete lack of data-hiding.

The proper way to mark a variable as user-changeable is to start the
docstring with a "*".  To mark variables (or consts) as "private", it
has become somewhat common to use a double dash like prefix--value
instead of prefix-value.



regards,
Nikolaj Schumacher




reply via email to

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