From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help Subject: Re: Working with constansts Date: Tue, 12 May 2009 11:46:18 +0200 Message-ID: References: <87d4ahylp3.fsf@galatea.local> <1366bf1a-69d5-4b72-b1c8-faf16494eaea@e23g2000vbe.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1242121640 8387 80.91.229.12 (12 May 2009 09:47:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 May 2009 09:47:20 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Decebal Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 12 11:47:11 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M3oZq-00075z-I5 for geh-help-gnu-emacs@m.gmane.org; Tue, 12 May 2009 11:47:10 +0200 Original-Received: from localhost ([127.0.0.1]:59161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3oZp-0001yR-IL for geh-help-gnu-emacs@m.gmane.org; Tue, 12 May 2009 05:47:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M3oZ5-0001xa-6J for help-gnu-emacs@gnu.org; Tue, 12 May 2009 05:46:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M3oZ3-0001wP-2W for help-gnu-emacs@gnu.org; Tue, 12 May 2009 05:46:21 -0400 Original-Received: from [199.232.76.173] (port=34692 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3oZ2-0001wC-Pa for help-gnu-emacs@gnu.org; Tue, 12 May 2009 05:46:20 -0400 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:50714) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M3oZ2-00024Z-Ds for help-gnu-emacs@gnu.org; Tue, 12 May 2009 05:46:20 -0400 Original-Received: from thursday (f051097222.adsl.alicedsl.de [78.51.97.222]) by dd18200.kasserver.com (Postfix) with ESMTP id F06F118098F2E; Tue, 12 May 2009 11:46:21 +0200 (CEST) In-Reply-To: <1366bf1a-69d5-4b72-b1c8-faf16494eaea@e23g2000vbe.googlegroups.com> (Decebal's message of "Mon, 11 May 2009 01:27:03 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (darwin) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64366 Archived-At: Decebal 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