guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gettext #" reader macro?


From: Tobias Gerdin
Subject: gettext #" reader macro?
Date: Thu, 6 Oct 2011 14:35:37 +0200

Hello,

I was looking through http://www.gnu.org/software/guile/ideas.html and
the gettext support. I thought this would be a small fun thing to hack
on but apparently it is already implemented as of quite some time.

For convenient use doing something like (define _ gettext) is
recommended. The #"text" syntax that the above page proposes is more
concise and in my opinion quite nice, so I did the below and stuck it
in boot-9.scm:

(read-hash-extend #\"
                  (lambda (c port)
                    `(gettext ,((module-ref
                                 (resolve-interface '(ice-9 rdelim))
                                 'read-delimited)
                                ;; FIXME skipped quoted \"
                                "\"" port))))

Should we include sth like this?

-Tobias



reply via email to

[Prev in Thread] Current Thread [Next in Thread]