From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.help Subject: Re: :name or 'name? Date: Mon, 21 Jan 2013 21:29:35 +0200 Organization: Oleksandr Gavenko , http://gavenkoa.users.sf.net Message-ID: <8738xul4gw.fsf@gavenkoa.example.com> References: <877gn6l7dy.fsf@gavenkoa.example.com> <20130121185351.GB25969@kuru.dyndns-at-home.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358796593 26067 80.91.229.3 (21 Jan 2013 19:29:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Jan 2013 19:29:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 21 20:30:12 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TxN4O-0001oP-I3 for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Jan 2013 20:30:12 +0100 Original-Received: from localhost ([::1]:41736 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxN47-0000RA-8U for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Jan 2013 14:29:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxN3z-0000Qn-Ja for help-gnu-emacs@gnu.org; Mon, 21 Jan 2013 14:29:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TxN3y-000662-SC for help-gnu-emacs@gnu.org; Mon, 21 Jan 2013 14:29:47 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:47346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxN3y-00065q-LR for help-gnu-emacs@gnu.org; Mon, 21 Jan 2013 14:29:46 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TxN4E-0001kZ-Bo for help-gnu-emacs@gnu.org; Mon, 21 Jan 2013 20:30:02 +0100 Original-Received: from 37.229.4.200 ([37.229.4.200]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Jan 2013 20:30:02 +0100 Original-Received: from gavenkoa by 37.229.4.200 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Jan 2013 20:30:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 37.229.4.200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:6mtEihA1DIUSz8lHFTNIa/44WEE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88748 Archived-At: 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!