unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Jean Abou Samra <jean@abou-samra.fr>
To: Christopher Lam <christopher.lck@gmail.com>,
	bug-guile@gnu.org, guile-devel <guile-devel@gnu.org>
Subject: Re: simple-format vs (ice-9 format) bug in 3.0.7?
Date: Tue, 27 Sep 2022 12:38:29 +0200	[thread overview]
Message-ID: <6396d555-17fe-dc16-970b-f1075e61131a@abou-samra.fr> (raw)
In-Reply-To: <00542b80-4511-f902-1f8d-a8c5d1645bc3@abou-samra.fr>



Le 27/09/2022 à 12:35, Jean Abou Samra a écrit :
>
>
> Le 27/09/2022 à 12:23, Christopher Lam a écrit :
>> Hi guilers, here's a short bash session.
>> Why would the first bash call to "guile s.scm" work, but not the 
>> second one?
>> guile-3.0.7 on ubuntu.
>>
>
>
> This is a duplicate of
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50059
>


Uh, at the end of module/ice-9/format.scm, there is

;; Thanks to Shuji Narazaki
(module-set! the-root-module 'format format)

which dates back to

commit 14469b7c69feb0f2c5b8a093f19fe2a548b31c5b
Author: Greg J. Badros <gjb@cs.washington.edu>
Date:   Thu Jan 20 20:58:30 2000 +0000

     * format.scm: Use (variable-set! (builtin-variable 'format)) to
     re-define format to be format:format (instead of just define,
     which interacts poorly with the module system).  Thanks to Shuji
     Narazaki for this change.

diff --git a/ice-9/format.scm b/ice-9/format.scm
index fce2737ce..40f20b3da 100644
--- a/ice-9/format.scm
+++ b/ice-9/format.scm
@@ -1670,7 +1670,9 @@

  (define format:abort (lambda () (error "error in format")))

-(define format format:format)
+;;(define format format:format)
+;; Thanks to Shuji Narazaki
+(variable-set! (builtin-variable 'format) format:format)

  ;; If this is not possible then a continuation is used to recover
  ;; properly from a format error. In this case format returns #f.



This probably predates #:replace and could be removed now, right?



  reply	other threads:[~2022-09-27 10:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 10:23 bug#58109: simple-format vs (ice-9 format) bug in 3.0.7? Christopher Lam
2022-09-27 10:35 ` Jean Abou Samra
2022-09-27 10:38   ` Jean Abou Samra [this message]
2022-10-01 13:40     ` Ludovic Courtès
     [not found]     ` <87ill3fyrh.fsf@gnu.org>
2022-10-01 14:14       ` Jean Abou Samra
     [not found]       ` <cc81cf8f-86f5-f350-cab5-e090ade1cbc7@abou-samra.fr>
2022-10-12 20:50         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6396d555-17fe-dc16-970b-f1075e61131a@abou-samra.fr \
    --to=jean@abou-samra.fr \
    --cc=bug-guile@gnu.org \
    --cc=christopher.lck@gmail.com \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).