[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Symbol properties :prop vs 'prop
From: |
sokobania . 01 |
Subject: |
Re: Symbol properties :prop vs 'prop |
Date: |
Tue, 14 Oct 2014 08:33:18 -0700 (PDT) |
User-agent: |
G2/1.0 |
Le dimanche 12 octobre 2014 09:44:42 UTC+2, Pascal J. Bourguignon a écrit :
> Paul Rankin writes:
>
> > Is there any difference between naming a symbol property as :prop vs
> > 'prop? i.e. what does the colon ":" mean?
> > (put 'my-symbol :width 45)
> > (put 'my-symbol 'width 45)
>
> In emacs lisp, there's no difference.
You just need to be coherent of course!
ELISP> (put 'my-symbol :width 45)
45
ELISP> (get 'my-symbol :width)
45
ELISP> (get 'my-symbol 'width)
nil
ELISP> (eq 'width ':width)
nil