From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: New macro with-demoted-errors Date: Sun, 08 Jul 2007 10:08:54 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1183903746 28812 80.91.229.12 (8 Jul 2007 14:09:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 8 Jul 2007 14:09:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 08 16:09:05 2007 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I7XRf-00089y-VV for ged-emacs-devel@m.gmane.org; Sun, 08 Jul 2007 16:09:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I7XRf-0003K5-8j for ged-emacs-devel@m.gmane.org; Sun, 08 Jul 2007 10:09:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I7XRb-0003J8-Vd for emacs-devel@gnu.org; Sun, 08 Jul 2007 10:09:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I7XRZ-0003Iw-Hs for emacs-devel@gnu.org; Sun, 08 Jul 2007 10:08:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I7XRZ-0003It-Ex for emacs-devel@gnu.org; Sun, 08 Jul 2007 10:08:57 -0400 Original-Received: from tomts43.bellnexxia.net ([209.226.175.110] helo=tomts43-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I7XRY-0001av-8O; Sun, 08 Jul 2007 10:08:56 -0400 Original-Received: from pastel.home ([74.12.204.164]) by tomts43-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070708140854.BAD5730.tomts43-srv.bellnexxia.net@pastel.home>; Sun, 8 Jul 2007 10:08:54 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id A15BA8045; Sun, 8 Jul 2007 10:08:54 -0400 (EDT) In-Reply-To: (Richard Stallman's message of "Sat\, 07 Jul 2007 16\:47\:05 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-detected-kernel: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:74464 Archived-At: > + `(lexical-let ((f (lambda () ,@body))) > lexical-let is a cl macro, and I'd rather not make subr.el use them. It probably breaks bootstrapping indeed. I can make it use make-symbol, if you prefer. > Perhaps we should add a way to make condition-case operate only if > (null debug-on-error). It could use some sort of marker symbol > in the handler: > (condition-case ,err > (funcall f) > ((debug error) (message "Error: %s" ,err) nil)))))) > would mean to catch all errors but only if debug-on-error is nil. But that same syntax currently means "catch `error' or `debug' signals", so it seems a bit dangerous to change its meaning. How 'bout (condition-case ,err (funcall f) (((not debug) error) (message "Error: %s" ,err) nil)))))) Still, a problem here is that it requires extending `condition-case' in the C code and in the byte-compiler. I'd rather just provide a new macro condition-case-non-debug. > That would be a lot more convenient, whether for writing the macro, > for for direct use. Indeed. Stefan