[Top][All Lists]

[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:29:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

On 2013-01-21, Suvayu Ali wrote:

> On Mon, Jan 21, 2013 at 08:26:33PM +0200, Oleksandr Gavenko wrote:
>>   (put :mylib-error "Unknown mylib error")
>>   (put :mylib-error 'error-conditions '(:mylib-error error))
>>   ...
>>   (condition-case 'var BODY (:mylib-error ...))
> Are you sure this is correct syntax?  The way I understand it, put takes
> a symbol name as the first argument, so it should be 'symbol or a
> variable that evaluates to 'symbol.
I don't try my code. But after minor fixes this work as I expect:

  (put :mylib-error 'error-message "Unknown mylib error")
  (put :mylib-error 'error-conditions '(:mylib-error error))
  (condition-case var (signal :mylib-error nil) (:mylib-error (message "OK")))

Best regards!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]