Re: simple-format vs (ice-9 format) bug in 3.0.7?
Jean Abou Samra <[email protected]>
| Newsgroups | gmane.lisp.guile.devel,gmane.lisp.guile.bugs |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> 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?