[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Slib-discuss] [patch] slib 3b3 breaks in require.scm when guile pre
From: |
Aubrey Jaffer |
Subject: |
Re: [Slib-discuss] [patch] slib 3b3 breaks in require.scm when guile prefix keywords are used |
Date: |
Mon, 21 May 2012 21:49:07 -0400 (EDT) |
| Date: Tue, 8 May 2012 13:37:05 +0200
| From: Utz-Uwe Haus <address@hidden>
|
| I have some legacy code written for both guile and CL which uses
|
| (read-set! keywords 'prefix)
|
| to enable CL-style keyword syntax in the guile reader. Recent SLIB
| breaks with this setting in require.scm, where
|
| slib:report-locations
|
| calls (WRITE ':) through the report:print function. This function
| (looking rather different then) worked fine at least in 2.something
| SLIB, but now generates a reader error because the COLON symbol is
| now special to the reader.
|
| To reproduce: start
| $ guile
| > (read-set! keywords 'prefix)
| load slib:
| > (use-modules (ice-9 slib))
address@hidden:~/slib$ guile
guile> (read-set! keywords 'prefix)
(keywords prefix positions)
guile> (use-modules (ice-9 slib))
ERROR: In procedure primitive-load-path:
ERROR: Unable to find file "slib/guile.init" in load path
ABORT: (misc-error)
Also concerning is that LOAD in guile-1.8.7 is busted with SLIB:
address@hidden:~/slib$ slib guile
guile> (require 'new-catalog)
ERROR: In procedure open-file:
ERROR: No such file or directory: "/usr/local/lib/slib/mklibcat"
ABORT: (system-error)
The last SLIB ChangeLog entry for Guile is for Guile-1.9.7.
| ... reader error in require.scm ...
|
| I know that what I do with guile is a hack, but it would still be
| nice to have SLIB loadable with this setting.
|
| I would suggest the fix below, using #\: instead of ': to denote
| the character.
I could do that, but it won't fix the cases in the other files.
While (slib:warn 'foo '#\: 'bad 'karma) in Guile prints:
;;; WARNING (foo : bad karma)
Other implementations print:
;WARN: foo #\: bad karma
which is confusing.
Isn't it lame that Guile chokes on ': ? I think it should be
relatively easy to fix Guile's reader to handle ': as a special case
(like '-).
| This patch is enough for me, but I have not checked whether the use
| of ': in color.scm error statements might create similar trouble
| for others.
': occurs in differ.scm, color.scm, xml-parse.scm, srfi.scm,
mwdenote.scm, schmooz.scm, and require.scm, primarily in slib:error
calls.