From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Thomas Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Improve Malayalam language transliteration Date: Wed, 15 Jul 2020 17:41:02 +0530 Message-ID: <87365t9dwp.fsf@Kittu.i-did-not-set--mail-host-address--so-tickle-me> References: <87d07ul5m1.fsf@gmx.net> <83r1wa5k1w.fsf@gnu.org> <87tv161aml.fsf@gmx.net> <83eesa5fxi.fsf@gnu.org> <87zhaxk5tw.fsf@gmx.net> <83wo4wq81f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27928"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 15 14:14:26 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jvgIs-00078k-0x for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Jul 2020 14:14:26 +0200 Original-Received: from localhost ([::1]:44218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvgIq-00054l-TC for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Jul 2020 08:14:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvgFz-0003tf-Ov for emacs-devel@gnu.org; Wed, 15 Jul 2020 08:11:27 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:44899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvgFs-0007p4-Np; Wed, 15 Jul 2020 08:11:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1594815077; bh=CN2+Wq/Vd8YEZgSCvx24686pTDKLaDhRlHBB5HJDV3g=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=Qk2paZQW3zjhtoF+9w/YdMO0G+4nJryUHfVyqjEc1O8hoSbKJF6BBUvw7yVq2AOgI FhGcMkLNE6j9QVeHzIi0BenBBQKq+3ktKpBmcnSfOpGG+1KsVX9oVRWhkN4c6ovjhp lThJpk6NpZVmQSlj8U9J17gal7Hjh+vF5OpUrXgM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from localhost ([117.206.177.63]) by mail.gmx.com (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MQMyf-1kHrwT1DwP-00MM17; Wed, 15 Jul 2020 14:11:16 +0200 In-Reply-To: <83wo4wq81f.fsf@gnu.org> X-Provags-ID: V03:K1:qJVW563LaAhKnnf/DWYOSZAL4Po9B4ziOpPGQrDxkMinheSgWm4 W6tz3OLoJBcQBuUtnF5RIOlm7BfKLhr9N6b6cPY3SGLn0wdXx8t+hOWLwudtiUghERMSjYP lis+hoxbYqyYNiasXZTUF+GBkZshK7g8zl0ham0/W5Trwd/HMEyBgPyN/mh3cLPjuOOMwo8 ubCH2pOsSQjht96O9xD1A== X-UI-Out-Filterresults: notjunk:1;V03:K0:aiT2crHoIYM=:lPV2nfboW9X6XqUfDKfXZL 9ssy+5VFh2xWnBSEuiaQe9VpkzS0waxVBPDkbbxSdvdGD3b310huxGJ4I/ob1npuAnl69mIBw DUpFpEStN0hVt5XDau62KR/aJ2wYkLTkqBGP8+cHHsDexFJ+MsSopIasUcGXHHqOi7btKNWre vKQuW4jfLwS1u/s3z4ZTJwnYKVwTIzkQHYQTsiFaixwv1IQwzZ7pLJys7afkAqYlHG0Q6yAGJ fOa0f15dYWZUgGRPj+Ol2goF4jzqxeCDs0bPI6DAfwMWK733fI9OCyL7VxrD1jadoUgJJ2+7I OOKPTTDP0Gg1CQu2/6BaJ0fR7oHS1lw15ackp0wKtmKSsfYMgWuuhbAVqqY+hBOe764/nyDmT etOUfGseaK+b9ZI6YkdkEUAZvq6vTYwnTcoCsoxOFmhETcUFNJ73Ab8pAURGk+UHUIi9zf1EE HvhnlHn1ciToQt9c90lUe85u4eM5ICr/FvZ7pgMuM5VzyHoHbzev+D5fmE4ij0Ey0q24I9Ge8 AnXfTVteXeI9HIXLpukC54LTFtoMeRypyHCtxjNYFkKWM87ziWvVN45MfkEdGuzUjUHP4Ikkj k0ne6LFgSMED34DwujoEsoANmArWPjR1JMpOzJGZvtkPi7xiSWjYvdvbOjknqsRVGcFX8q3XY f7X1BHV2adwfqLi6xRXa1zZ4iykA+pIpZ7bJMmJr/bv4z4tYx7WQpMrYdXFqZ2DrdLAFH1l8A vpjy7cykW1bzKBkJ3XXdZ0EPE878bOABjAImUu7J8z7EAu3IHAoOo9uteaeEIcodrXqxX+mp Received-SPF: pass client-ip=212.227.17.22; envelope-from=jimjoe@gmx.net; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/15 06:31:16 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:252966 Archived-At: --=-=-= Content-Type: text/plain Please consider this new patch (to my own code) which uses strings rather than (expensive) lists to represent constant char sequences. Eli Zaretskii writes: > Thanks, I pushed this to the master branch. --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-indian-mlm-mozhi-update-translation-Use-strings-for-.patch Content-Transfer-Encoding: quoted-printable >From 7e3007d5d08384e7c4c2e93d6e20ab4fc435d3fd Mon Sep 17 00:00:00 2001 From: James Thomas Date: Wed, 15 Jul 2020 17:29:08 +0530 Subject: [PATCH] indian-mlm-mozhi-update-translation: Use strings for const= ant sequences * lisp/leim/quail/indian.el (indian-mlm-mozhi-update-translation): Use strings rather than lists for constant sequences. Copyright-paperwork-exempt: yes --- lisp/leim/quail/indian.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el index 100ae63f6a..e1322ddc1e 100644 --- a/lisp/leim/quail/indian.el +++ b/lisp/leim/quail/indian.el @@ -576,18 +576,18 @@ "X" =20 (defun indian-mlm-mozhi-update-translation (control-flag) (let ((len (length quail-current-key)) chillu - (vowels '(?a ?e ?i ?o ?u ?A ?E ?I ?O ?U ?R))) + (vowels "aeiouAEIOUR")) (cond ((numberp control-flag) (progn (if (=3D control-flag 0) (setq quail-current-str quail-current-key) (cond (input-method-exit-on-first-char) - ((and (memq (aref quail-current-key - (1- control-flag)) - vowels) + ((and (cl-find (aref quail-current-key + (1- control-flag)) + vowels) (setq chillu (cl-position (aref quail-current-key control-flag) - '(?m ?N ?n ?r ?l ?L)))) + "mNnrlL"))) ;; conditions for putting chillu (and (or (and (=3D control-flag (1- len)) (not (setq control-flag nil))) @@ -606,7 +606,7 @@ indian-mlm-mozhi-update-translation (string quail-current-str) quail-current-str) (string - (nth chillu '(?=E0=B4=82 ?=E0=B5=BA ?=E0=B5=BB ?=E0=B5=BC ?=E0= =B5=BD ?=E0=B5=BE))))))))) + (aref "=E0=B4=82=E0=B5=BA=E0=B5=BB=E0=B5=BC=E0=B5=BD=E0=B5=BE"= chillu)))))))) (and (not input-method-exit-on-first-char) control-flag (while (> len control-flag) (setq len (1- len)) @@ -619,8 +619,8 @@ indian-mlm-mozhi-update-translation (setq quail-current-str quail-current-key) )) ((equal control-flag t) - (if (memq (aref quail-current-key (1- len)) ;; If vowel ending, - vowels) ;; may have to put + (if (cl-find (aref quail-current-key (1- len));; If vowel ending, + vowels) ;; may have to put (setq control-flag nil))))) ;; chillu. So don't control-flag) ;; end translation =20 --=20 2.25.1 --=-=-=--