
I’m looking to programatically get indentation info for use with a text%
object. For this I’m looking into using read-language
to get the determine-spaces
procedure for a given language, but this doesn’t seem to work with #lang racket
or #lang racket/base
. For example, if I run the following code:
(define scrib-in (open-input-string "#lang scribble/base"))
(define scrib-info (read-language scrib-in))
(scrib-info 'drracket:indentation #f))
I get back #<procedure:determine-spaces>
, which is exactly what I want. However, when I run the following similar code for #lang racket/base
:
(define rkt-in (open-input-string "#lang racket/base"))
(define rkt-info (read-language rkt-in))
(rkt-info 'drracket:indentation #f)
I get back #f
. I know that this is the intended behavior, i.e. when language-info
returns false, then that means that the language is either racket or racket/base. But I’m wondering if there’s any way to work around this so I can get the procedures I need for the racket and racket/base languages. Is there a “default” version exposed somewhere that I can access in the case that language-info
returns #f
?

@lexi.lambda Did you change splicing-syntax-parameterize
when you were adding splicing-parameterize
?

no, but I did change splicing-syntax-parameterize
a month or two ago

Ah, okay.

Well I think it might have broken some of my code that used it.

Can you share with me the change you made?

I made a couple of small changes… maybe open a bug on racket/racket and ping me

preferably with a program that works on Racket 6.11 but not 6.12

@leif maybe you want https://github.com/racket/racket/commit/00d438cfbe8ea4d8db8277fc712d3315cf4a9e5f

or something from this list: https://github.com/racket/racket/commits?author=lexi-lambda

@ben’s commit is the first one, but it was largely superseded by https://github.com/racket/racket/commit/1e38918aa9719d212534d2027aa1a3a8b46462dd

if you have a program that changed behavior, it would be very useful to add it as a test case to the splicing-syntax-parameterize test suite

Ya, I will do that as soon as I can make a minimal example.

It was…err…well, super complicated.

And kind of broke sets of scopes in very odd ways. :wink:

Anyway, thanks @ben and @lexi.lambda