[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: :name or 'name?
From: |
Oleksandr Gavenko |
Subject: |
Re: :name or 'name? |
Date: |
Mon, 21 Jan 2013 21:36:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
On 2013-01-21, Christopher Schmidt wrote:
> Oleksandr Gavenko <gavenkoa@gmail.com> writes:
>> Is that usual use :name instead of 'name in elisp code (in places
>> where you need symbol)?
>
> (info "(elisp)Symbol Type")
> (info "(elisp)Quoting")
>
Seems that I understand and already know those topics...
My question is that usual instead of quoting symbol use "keyword symbol" which
you don't need to quote...
So you can write:
(put :mylib-error 'error-message "Unknown mylib error")
instead of:
(put 'mylib-error 'error-message "Unknown mylib error")
or:
(put (quote mylib-error) 'error-message "Unknown mylib error")
or
(put (make-symbol "mylib-error") 'error-message "Unknown mylib error")
So avoid quoting by special naming conventions...
--
Best regards!