From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: IRC client for Emacs Date: Thu, 15 Aug 2002 13:54:56 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200208151954.g7FJsut07968@wijiji.santafe.edu> References: <873ctot40n.fsf@emacswiki.org> <20020809223753.955308.FMU31823@piglet.prv.splode.com> <200208110355.g7B3tOo06247@wijiji.santafe.edu> <877kixtg8w.fsf@emacswiki.org> <20020811160610.424772.FMU9022@piglet.prv.splode.com> <87fzxhs1ia.fsf@emacswiki.org> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1029441412 13465 127.0.0.1 (15 Aug 2002 19:56:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 15 Aug 2002 19:56:52 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17fQjj-0003V4-00 for ; Thu, 15 Aug 2002 21:56:51 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17fR9M-0005Gs-00 for ; Thu, 15 Aug 2002 22:23:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17fQki-0000rB-00; Thu, 15 Aug 2002 15:57:52 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17fQiO-0000Sv-00 for emacs-devel@gnu.org; Thu, 15 Aug 2002 15:55:28 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17fQhy-0000Iw-00 for emacs-devel@gnu.org; Thu, 15 Aug 2002 15:55:18 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17fQhv-0000GH-00; Thu, 15 Aug 2002 15:54:59 -0400 Original-Received: from wijiji.santafe.edu (wijiji [192.12.12.5]) by pele.santafe.edu (8.11.6+Sun/8.11.6) with ESMTP id g7FJtH501471; Thu, 15 Aug 2002 13:55:17 -0600 (MDT) Original-Received: (from rms@localhost) by wijiji.santafe.edu (8.11.6+Sun/8.9.3) id g7FJsut07968; Thu, 15 Aug 2002 13:54:56 -0600 (MDT) X-Authentication-Warning: wijiji.santafe.edu: rms set sender to rms@wijiji using -f Original-To: alex@emacswiki.org In-Reply-To: <87fzxhs1ia.fsf@emacswiki.org> (message from Alex Schroeder on Wed, 14 Aug 2002 21:07:09 +0200) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6572 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6572 Maybe for applications within Emacs. In erc.el there is code like this: (defun erc-make-message-variable-name (catalog entry) (intern (concat "erc-message-" (symbol-name catalog) "-" (symbol-name entry)))) This seems like a space-inefficient way to store the data, creating a symbol for each translatable string. Aside from that, how would you load a new message catalog? I suppose you would set each of these variables. That means Emacs can only hold one message catalog for the category at any time. I think it would be better to use a hash table to record the message catalog, and to look up the original string in the hash table to translate it. This would be more space-efficient, I think. And it would be quick and easy to switch between different message catalogs. The drawback would be that lookup is slower. But I think this won't matter much, because these operations are mostly for user output. A program that needs to use various message translations, and wants to run fast, could look them up once at the outset and then save the translations in local variables. This would combine the advantages of both methods.