From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Decebal Newsgroups: gmane.emacs.help Subject: Re: Working with constansts Date: Mon, 11 May 2009 01:27:03 -0700 (PDT) Organization: http://groups.google.com Message-ID: <1366bf1a-69d5-4b72-b1c8-faf16494eaea@e23g2000vbe.googlegroups.com> References: <87d4ahylp3.fsf@galatea.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1242031276 1615 80.91.229.12 (11 May 2009 08:41:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 May 2009 08:41:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 11 10:41:07 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 1M3R4N-0000N4-F5 for geh-help-gnu-emacs@m.gmane.org; Mon, 11 May 2009 10:41:07 +0200 Original-Received: from localhost ([127.0.0.1]:43210 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3R4M-0000c8-UK for geh-help-gnu-emacs@m.gmane.org; Mon, 11 May 2009 04:41:06 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!postnews.google.com!e23g2000vbe.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: 84.53.123.169 Original-X-Trace: posting.google.com 1242030423 15935 127.0.0.1 (11 May 2009 08:27:03 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 11 May 2009 08:27:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e23g2000vbe.googlegroups.com; posting-host=84.53.123.169; posting-account=K-cdeAoAAAD_0d505kUtHXJaT5LFIu-3 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.9.0.9) Gecko/2009040820 Firefox/3.0.9,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:169080 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:64343 Archived-At: On May 10, 6:19=A0pm, p...@informatimago.com (Pascal J. Bourguignon) wrote: > Decebal writes: > > I would like to work with constants in my elisp code. I thought that I > > could do this with defconst, but that doen not work. > > After: > > =A0 =A0 (defconst dummy "testing") > > The variable dummy has the value "testing". > > But after: > > =A0 =A0 (setq dummy "changed") > > The variable dummy has the value "changed". > > What am I doing wrong. > > You're still thinking that constants don't change or that variables do. > > If you don't want to change the value of a constant, then don't change it= . 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. By the way: you can only change sources if you have them. ;-] Also: changing a source and recompiling is a little bit more obvious - also for the person doing it- as a setq. But my understanding of elisp has been amended. That never hurts.