From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel,gmane.emacs.blogging Subject: Re: [Emacsweblogs] i18n Date: Mon, 01 Feb 2010 17:51:36 +0900 Message-ID: <877hqxqqxz.fsf@xemacs.org> References: <1e7a74211001281954h1295a717id942a4405dc98b25@mail.gmail.com> <87vdekbt60.fsf@everybody.org> <1e7a74211001310729s6b0c506cv41cdea9b19274fba@mail.gmail.com> <87fx5l8kat.fsf@everybody.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1265014100 16593 80.91.229.12 (1 Feb 2010 08:48:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Feb 2010 08:48:20 +0000 (UTC) Cc: emacs-devel@gnu.org, emacsweblogs@nongnu.org, smc To: mah@everybody.org (Mark A. Hershberger) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 01 09:48:17 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NbrxB-0008AL-74 for ged-emacs-devel@m.gmane.org; Mon, 01 Feb 2010 09:48:17 +0100 Original-Received: from localhost ([127.0.0.1]:59954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NbrxA-0004XD-JQ for ged-emacs-devel@m.gmane.org; Mon, 01 Feb 2010 03:48:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nbrp1-00038Z-3D for emacs-devel@gnu.org; Mon, 01 Feb 2010 03:39:51 -0500 Original-Received: from [199.232.76.173] (port=45247 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nbroy-000385-P1 for emacs-devel@gnu.org; Mon, 01 Feb 2010 03:39:49 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nbrox-0004F6-0a for emacs-devel@gnu.org; Mon, 01 Feb 2010 03:39:48 -0500 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]:39305) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nbrow-0004Ea-FV for emacs-devel@gnu.org; Mon, 01 Feb 2010 03:39:46 -0500 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id 00E748212; Mon, 1 Feb 2010 17:39:41 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 6BA3C1A2630; Mon, 1 Feb 2010 17:51:36 +0900 (JST) In-Reply-To: <87fx5l8kat.fsf@everybody.org> X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta29) "garbanzo" a03421eb562b XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:120772 gmane.emacs.blogging:85 Archived-At: 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?"