From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: [Guile-commits] GNU Guile branch, string_abstraction2, updated. 823e444052817ee120d87a3575acb4f767f17475 Date: Wed, 27 May 2009 00:46:22 +0200 Message-ID: References: <87tz38u8jr.fsf@gnu.org> <799701.86503.qm@web37908.mail.mud.yahoo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1243519240 22095 80.91.229.12 (28 May 2009 14:00:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 May 2009 14:00:40 +0000 (UTC) Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , guile-devel@gnu.org To: Mike Gran Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu May 28 16:00:35 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M9g9r-0001Pk-JZ for guile-devel@m.gmane.org; Thu, 28 May 2009 16:00:35 +0200 Original-Received: from localhost ([127.0.0.1]:57840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M9g9q-0003az-RG for guile-devel@m.gmane.org; Thu, 28 May 2009 10:00:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M9g9k-0003Yp-A3 for guile-devel@gnu.org; Thu, 28 May 2009 10:00:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M9g9e-0003Sj-TJ for guile-devel@gnu.org; Thu, 28 May 2009 10:00:27 -0400 Original-Received: from [199.232.76.173] (port=35397 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M9g9e-0003SR-Jd for guile-devel@gnu.org; Thu, 28 May 2009 10:00:22 -0400 Original-Received: from a-sasl-quonix.sasl.smtp.pobox.com ([208.72.237.25]:57693 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M9g9b-0004RI-8P; Thu, 28 May 2009 10:00:19 -0400 Original-Received: from localhost.localdomain (unknown [127.0.0.1]) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id ECFB21BCF6; Thu, 28 May 2009 10:00:17 -0400 (EDT) Original-Received: from unquote (unknown [82.123.47.119]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id 6A0EF1BCF5; Thu, 28 May 2009 10:00:15 -0400 (EDT) In-Reply-To: <799701.86503.qm@web37908.mail.mud.yahoo.com> (Mike Gran's message of "Tue, 26 May 2009 15:26:45 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-Pobox-Relay-ID: E01544CE-4B8F-11DE-AFC6-B4FDD46C8AFF-02397024!a-sasl-quonix.pobox.com X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:8541 Archived-At: Hi Mike, On Wed 27 May 2009 00:26, Mike Gran writes: > If one can't depend on the order of evaluation, the the source encoding > has to become a pragma that is preprocessed. One can depend on the order of evaluation, but not of the order of reading and evaluation. > The reader could probably preprocess the file looking for where > the text "coding: XXXXX" appears within a comment in the top dozen > lines of a source code file. Or perhaps a line that is explicitly > ";;;; #pragma coding: XXXXX" in the top few lines of a file. This sounds almost sane to me. I think python has a standard for this: http://www.python.org/dev/peps/pep-0263/ This is complicated in Guile by #!. A reasonable thing would be to have the reader have a bit on whether it actually saw an expression yet or not. If not, "^;+ [^\n]*coding: ..." would set the file's encoding. Andy -- http://wingolog.org/