From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: A question about read syntax and compiled backreferences Date: Tue, 23 Jan 2007 18:48:31 +0900 Message-ID: References: Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1169545916 3818 80.91.229.12 (23 Jan 2007 09:51:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Jan 2007 09:51:56 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 23 10:51:50 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 1H9IJi-00013T-1a for ged-emacs-devel@m.gmane.org; Tue, 23 Jan 2007 10:51:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9IJg-0000ZK-H7 for ged-emacs-devel@m.gmane.org; Tue, 23 Jan 2007 04:51:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9II5-0000X0-JB for emacs-devel@gnu.org; Tue, 23 Jan 2007 04:50:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9IGi-00084a-KJ for emacs-devel@gnu.org; Tue, 23 Jan 2007 04:50:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9IGh-000833-1L for emacs-devel@gnu.org; Tue, 23 Jan 2007 04:48:43 -0500 Original-Received: from [202.32.8.206] (helo=tyo202.gate.nec.co.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H9IGZ-00041F-Lu; Tue, 23 Jan 2007 04:48:37 -0500 Original-Received: from relay11.aps.necel.com ([10.29.19.46]) by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id l0N9mWiS021007; Tue, 23 Jan 2007 18:48:32 +0900 (JST) Original-Received: from relay11.aps.necel.com ([10.29.19.24] [10.29.19.24]) by relay11.aps.necel.com with ESMTP; Tue, 23 Jan 2007 18:48:32 +0900 Original-Received: from dhapc248.dev.necel.com ([10.114.97.235] [10.114.97.235]) by relay11.aps.necel.com with ESMTP; Tue, 23 Jan 2007 18:48:32 +0900 Original-Received: by dhapc248.dev.necel.com (Postfix, from userid 31295) id EED8113; Tue, 23 Jan 2007 18:48:31 +0900 (JST) Original-To: "Juanma Barranquero" System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: (Juanma Barranquero's message of "Mon\, 22 Jan 2007 17\:13\:07 +0100") Original-Lines: 54 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:65404 Archived-At: "Juanma Barranquero" writes: > (defun test () > (let ((z '#1=(a b . #1#))) > (safe-length z))) > > but trying to loading it from a byte-compiled file brings > > Invalid read syntax: "#" The following patch seems to fix this bug; I'm not sure if it's OK to apply or not (is print-circle significantly slower?). -Miles 2007-01-23 Miles Bader * emacs-lisp/bytecomp.el (byte-compile-output-file-form) (byte-compile-output-docform): Bind `print-circle' to t. --- orig/lisp/emacs-lisp/bytecomp.el +++ mod/lisp/emacs-lisp/bytecomp.el @@ -1,7 +1,7 @@ ;;; bytecomp.el --- compilation of Lisp code into byte code ;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002, -;; 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +;; 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. ;; Author: Jamie Zawinski ;; Hallvard Furuseth @@ -2082,7 +2082,8 @@ (print-length nil) (print-level nil) (print-quoted t) - (print-gensym t)) + (print-gensym t) + (print-circle t)) ; handle circular data structures (princ "\n" outbuffer) (prin1 form outbuffer) nil))) @@ -2139,6 +2140,7 @@ ;; print-gensym-alist not to be cleared ;; between calls to print functions. (print-gensym '(t)) + (print-circle t) ; handle circular data structures print-gensym-alist ; was used before print-circle existed. (print-continuous-numbering t) print-number-table -- "Whatever you do will be insignificant, but it is very important that you do it." Mahatma Gandhi