[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Working with constansts
From: |
Decebal |
Subject: |
Re: Working with constansts |
Date: |
Mon, 11 May 2009 01:27:03 -0700 (PDT) |
User-agent: |
G2/1.0 |
On May 10, 6:19 pm, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> Decebal <CLDWester...@gmail.com> 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.
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.
- Re: Working with constansts, (continued)
- Re: Working with constansts, Nikolaj Schumacher, 2009/05/18
- Message not available
- Re: Working with constansts, Barry Margolin, 2009/05/10
- Re: Working with constansts, Richard Riley, 2009/05/10
- Re: Working with constansts, Nikolaj Schumacher, 2009/05/12
- Message not available
- Re: Working with constansts, Pascal J. Bourguignon, 2009/05/12
- Message not available
- Re: Working with constansts, Barry Margolin, 2009/05/13
- Re: Working with constansts, Ralf Wachinger, 2009/05/13
- Re: Working with constansts, Barry Margolin, 2009/05/13
- Re: Working with constansts, Thien-Thi Nguyen, 2009/05/11
- Message not available
- Re: Working with constansts, Barry Margolin, 2009/05/11
Re: Working with constansts,
Decebal <=