From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: adding consistent extra symbols to input methods (cyrillic-*, croatian-*, slov*, czech-* etc.) input methods Date: Sat, 05 Jul 2008 21:54:21 +0900 Message-ID: References: <86lk19mmua.fsf@lifelogs.com> <485298A4.30000@gnu.org> <867ict8awn.fsf@lifelogs.com> <87tzfvj16y.fsf@uwakimon.sk.tsukuba.ac.jp> <86lk12zee7.fsf@lifelogs.com> <86r6acqbif.fsf@lifelogs.com> <864p76lp60.fsf_-_@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1215275730 25549 80.91.229.12 (5 Jul 2008 16:35:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Jul 2008 16:35:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 05 18:36:17 2008 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.50) id 1KFAk5-0003Fk-Tu for ged-emacs-devel@m.gmane.org; Sat, 05 Jul 2008 18:36:14 +0200 Original-Received: from localhost ([127.0.0.1]:53227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KFAj9-0001SY-Q4 for ged-emacs-devel@m.gmane.org; Sat, 05 Jul 2008 12:35:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KFAic-0001DK-Mk for emacs-devel@gnu.org; Sat, 05 Jul 2008 12:34:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KFAia-0001B4-VG for emacs-devel@gnu.org; Sat, 05 Jul 2008 12:34:37 -0400 Original-Received: from [199.232.76.173] (port=33506 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KFAiZ-0001Aa-Qr for emacs-devel@gnu.org; Sat, 05 Jul 2008 12:34:35 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:22290) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KFAiY-0001SL-VO for emacs-devel@gnu.org; Sat, 05 Jul 2008 12:34:35 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KF7Hk-0006QZ-3C for emacs-devel@gnu.org; Sat, 05 Jul 2008 08:54:40 -0400 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id m65CsMHI015348; Sat, 5 Jul 2008 21:54:22 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id m65CsMsu023122; Sat, 5 Jul 2008 21:54:22 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id m65CsLem013058; Sat, 5 Jul 2008 21:54:21 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1KF7HR-0006sg-KI; Sat, 05 Jul 2008 21:54:21 +0900 In-reply-to: <864p76lp60.fsf_-_@lifelogs.com> (message from Ted Zlatanov on Thu, 03 Jul 2008 14:53:59 -0500) X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.aist.go.jp id m65CsMHI015348 X-detected-kernel: by mx20.gnu.org: Solaris 9 X-detected-kernel: by monty-python.gnu.org: 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:100370 Archived-At: In article <864p76lp60.fsf_-_@lifelogs.com>, Ted Zlatanov writes: > Right, I'm trying to do the above for input methods that are in > input-method-alist but not necessarily loaded. So this works: > (dolist (method=20 > (remove nil > (mapcar=20 > (lambda(m)=20 > (let ((name (car-safe m))) > (when (and (string-match "cyrillic" name) > (quail-package name)) > name))) > input-method-alist))) > (message "Defining rules for method %s" method) > (quail-defrule ",," ?=E2=80=9E method)) > The question is, should I load those input methods explicitly, or just > assume that it's enough to handle what's in leim/quail/cyrillic.el? You can't assume that all "cyrillic*" input methods are in leim/quail/cyrillic.el. So the safest (and more efficient) way is something like this: (mapc (lambda(m)=20 (let ((name (car m))) (when (string-match "cyrillic" name) (message "Defining rules for method %s" method) (activate-input-method name) (quail-defrule ",," ?=E2=80=9E) (inactivate-input-method)))) input-method-alist) But, I'm now thiking about introducing this variable to avoid eval-after-load in leim-ext.el: ;;;###autoload (defvar quail-additional-rule-alist nil "Alist of Quail package names vs. the rules to add after loading the pa= ckage. Each element has the form (PACKAGE-NAME RULE ...), where PACKAGE-NAME is a Quail package name (string representing an input method= ), and RULE is a translation rule of the form (KEY TRANSLATION APPEND). See the documentaion of the function `quail-defrule' for the meanings or KEY, TRANSLATION, and APPEND.") With this, you can do:=20 (mapc (lambda(m)=20 (let ((name (car m))) (when (string-match "cyrillic" name) (message "Defining rules for method %s" method) (push (list name '(",," ?=E2=80=9E)) quail-additional-rule-alist)))) input-method-alist) > Specifically, cyrillic-jis-russian wouldn't be handled this way, and it > can benefit from the extended mappings I am creating (proper double > quotes =E2=80=9E =E2=80=9C, single quotes =E2=80=9A=E2=80=98 and the =E2= =84=96 =C2=A7 =C2=AB =C2=BB symbols). If I should > special-case it in leim-ext.el that's fine, I'm just trying to approach > it programmatically. =20 I think cyrillic-jis-russian is now obsolete because all Cyrillic character in JIS are now unified into Unicode. --- Kenichi Handa handa@ni.aist.go.jp