all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: mah@everybody.org (Mark A. Hershberger)
Cc: emacs-devel@gnu.org, emacsweblogs@nongnu.org, smc <smc@manticore.es>
Subject: Re: [Emacsweblogs] i18n
Date: Mon, 01 Feb 2010 17:51:36 +0900	[thread overview]
Message-ID: <877hqxqqxz.fsf@xemacs.org> (raw)
In-Reply-To: <87fx5l8kat.fsf@everybody.org>

Mark A. Hershberger writes:

 > I don't know enough to say whether _"string" is a viable way to mark up
 > text in Emacs Lisp, but my first guess is that it isn't -- not without
 > work done to the internals.

It's not.

 > However, we could define a _ function so that we can wrap strings like
 > this:
 > 
 >     (_ "message")
 > 
 > It wouldn't be a simple, but could work.

Oh, that's simple enough, and would work.  IMHO, it's way too ugly,
though.  If you're going to do that, you might as well just

(defun gettext (message &optional domainname category) ...)

(see gettext(3) for the optional arguments, taken from dcgettext) and
use that.  Perhaps more (Common) Lispy would be keyword arguments,
with the idea of building them into an internationalized version of
format (and a fortiori message and princ y amigos).  And once you've
got `gettext', (defsubst _ (&rest args) (apply #'gettext args)) is
easy and efficient if you really must have it.

What would probably be best if you want reader syntax for this would
be some variation on #_"string".  This would also require work on the
internals, but wouldn't be that hard to do.  The question is "Too
ugly?"





  reply	other threads:[~2010-02-01  8:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1e7a74211001281954h1295a717id942a4405dc98b25@mail.gmail.com>
     [not found] ` <87vdekbt60.fsf@everybody.org>
2010-01-31 15:29   ` [Emacsweblogs] i18n smc
2010-02-01  7:52     ` Mark A. Hershberger
2010-02-01  8:51       ` Stephen J. Turnbull [this message]
2010-02-01 12:04         ` Juri Linkov
2010-02-01 13:22           ` Stephen J. Turnbull
2010-02-01 18:13             ` tomas
2010-02-01 18:20             ` Andreas Schwab
2010-02-01 21:45             ` i18n Juri Linkov
2010-02-01 16:01         ` [Emacsweblogs] i18n Stefan Monnier
2010-02-01 18:56           ` Drew Adams
2010-02-01 20:33             ` i18n Stefan Monnier
2010-02-01 21:36               ` [Emacsweblogs] i18n Drew Adams
2010-02-01 23:14                 ` i18n Stefan Monnier
2010-02-02  1:21               ` [Emacsweblogs] i18n Kenichi Handa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877hqxqqxz.fsf@xemacs.org \
    --to=stephen@xemacs.org \
    --cc=emacs-devel@gnu.org \
    --cc=emacsweblogs@nongnu.org \
    --cc=mah@everybody.org \
    --cc=smc@manticore.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.