From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: A question about read syntax and compiled backreferences Date: Sun, 28 Jan 2007 10:35:15 +0100 Message-ID: <85tzybsdd8.fsf@lola.goethe.zz> References: <85ac04xhg3.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1169976950 26426 80.91.229.12 (28 Jan 2007 09:35:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 28 Jan 2007 09:35:50 +0000 (UTC) Cc: Andreas Schwab , Emacs Devel , Miles Bader To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 28 10:35:43 2007 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 1HB6Rq-0008JS-Iy for ged-emacs-devel@m.gmane.org; Sun, 28 Jan 2007 10:35:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HB6Rp-0001IM-TP for ged-emacs-devel@m.gmane.org; Sun, 28 Jan 2007 04:35:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HB6RX-0001IG-F2 for emacs-devel@gnu.org; Sun, 28 Jan 2007 04:35:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HB6RU-0001I4-PS for emacs-devel@gnu.org; Sun, 28 Jan 2007 04:35:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HB6RU-0001I1-J8 for emacs-devel@gnu.org; Sun, 28 Jan 2007 04:35:20 -0500 Original-Received: from mail-in-09.arcor-online.net ([151.189.21.49]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HB6RT-0000hN-5v; Sun, 28 Jan 2007 04:35:19 -0500 Original-Received: from mail-in-02-z2.arcor-online.net (mail-in-02-z2.arcor-online.net [151.189.8.14]) by mail-in-09.arcor-online.net (Postfix) with ESMTP id 85DA12AE7A0; Sun, 28 Jan 2007 10:35:17 +0100 (CET) Original-Received: from mail-in-09.arcor-online.net (mail-in-09.arcor-online.net [151.189.21.49]) by mail-in-02-z2.arcor-online.net (Postfix) with ESMTP id 72F02113E5E; Sun, 28 Jan 2007 10:35:17 +0100 (CET) Original-Received: from lola.goethe.zz (dslb-084-061-042-081.pools.arcor-ip.net [84.61.42.81]) by mail-in-09.arcor-online.net (Postfix) with ESMTP id 2A1B62AE7A0; Sun, 28 Jan 2007 10:35:17 +0100 (CET) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 06B331C4D495; Sun, 28 Jan 2007 10:35:15 +0100 (CET) In-Reply-To: (Juanma Barranquero's message of "Sun\, 28 Jan 2007 00\:35\:41 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 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:65559 Archived-At: "Juanma Barranquero" writes: > On 1/27/07, David Kastrup wrote: > >> I don't think that >> the ability to byte-compile code with circular lists is really >> important enough to warrant this sort of inconvenience. > > I don't think having a local variable to deactivate it is > inconvenient; after all, there's only a few elisp packages in Emacs > where the slowdown is significant. > > OTOH, perhaps we could to the reverse: default print-circle to nil > during byte-compilation, and add a variable to activate it for the few > files that really need it. Sounds more sensible to me. But actually, I see print-circle is a variable defined in `src/print.c'. Its value is nil Documentation: *Non-nil means print recursive structures using #N= and #N# syntax. If nil, printing proceeds recursively and may lead to `max-lisp-eval-depth' being exceeded or an error may occur: "Apparently circular structure being printed." Also see `print-length' and `print-level'. If non-nil, shared substructures anywhere in the structure are printed with `#N=' before the first occurrence (in the order of the print representation) and `#N#' in place of each subsequent occurrence, where N is a positive decimal integer. Can't we just catch the error, remove what has been printed so far, and retry with print-circle set? That would give us no performance hit whatsoever during normal operation and would allow circular structures without announcing them. And the performance hit occurs not on the whole file, but just on the structure in question. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum