From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: Working with constansts Date: Sun, 10 May 2009 18:33:38 +0200 Organization: Informatimago Message-ID: <878wl4zzml.fsf@galatea.local> References: <87d4ahylp3.fsf@galatea.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1241973793 2318 80.91.229.12 (10 May 2009 16:43:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 May 2009 16:43:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 10 18:43:06 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 1M3C7D-0006Wr-LA for geh-help-gnu-emacs@m.gmane.org; Sun, 10 May 2009 18:43:03 +0200 Original-Received: from localhost ([127.0.0.1]:54656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3C7D-0004NG-5d for geh-help-gnu-emacs@m.gmane.org; Sun, 10 May 2009 12:43:03 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!syros.belnet.be!news.belnet.be!feeder.news-service.com!de-l.enfer-du-nord.net!usenet-fr.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!212.27.60.64.MISMATCH!cleanfeed3-b.proxad.net!nnrp2-1.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin) Cancel-Lock: sha1:MjlmNGNlOWE2MzY5OWVhMzI0NTk5NzFlNmMzZmQ3YzYxNDdhZmQwZQ== Original-Lines: 35 Original-NNTP-Posting-Date: 10 May 2009 18:33:39 MEST Original-NNTP-Posting-Host: 88.182.134.169 Original-X-Trace: 1241973219 news-3.free.fr 24009 88.182.134.169:63206 Original-X-Complaints-To: abuse@proxad.net Original-Xref: news.stanford.edu gnu.emacs.help:169058 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:64321 Archived-At: Richard Riley writes: > pjb@informatimago.com (Pascal J. Bourguignon) writes: > >> 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: >>> (defconst dummy "testing") >>> The variable dummy has the value "testing". >>> But after: >>> (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. > > Why is it called a constant if its not enforced? For example we call PI a constant. But PI is the ration between a circle circumference and its diameter, and this ratio depends on the curvature of the universe, so PI is not really a constant: in our universe it depends on the altitude, or the distance to the sun, (on the gravity in general). So if you want to avoid bugs in your emacs program when you travel, you must be able to nudge the values of the constants. -- __Pascal Bourguignon__