unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* gettext #" reader macro?
@ 2011-10-06 12:35 Tobias Gerdin
  2011-10-08 21:59 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Gerdin @ 2011-10-06 12:35 UTC (permalink / raw)
  To: guile-devel

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gettext #" reader macro?
  2011-10-06 12:35 gettext #" reader macro? Tobias Gerdin
@ 2011-10-08 21:59 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2011-10-08 21:59 UTC (permalink / raw)
  To: guile-devel

Hi,

Tobias Gerdin <tgerdin@gmail.com> skribis:

> 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:

I find (_ "text") just as concise and more likely to be directly
understood since _ is an alias for the ‘gettext’ function in most
languages, and the one used by default when running ‘gettextize’.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-08 21:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-06 12:35 gettext #" reader macro? Tobias Gerdin
2011-10-08 21:59 ` Ludovic Courtès

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).