[FreeBSD-users-jp 95434] Re: [tsunagi 37] Re: please review and test new tamago-tsunagi

Mitsutoshi NAKANO <[email protected]>
Newsgroups gmane.org.user-groups.freebsd.japan,gmane.linux.debian.jp.devel
Message-ID <CANW2+iv9Q5Y1WZ0f-vmQBP5KwigO3shsaOA+mxOHDDidJDnd-A@mail.gmail.com>
このメールは
TO
[email protected]
CC
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
で、複数のMLに送信しております。

2015年1月28日 23:56 Mitsutoshi NAKANO <[email protected]>:
> 2015年1月28日 21:08 ARAI Shun-ichi <[email protected]>:
>>
>> In <CANW2+iu9fWW1SN7KJDoWmuT1A1kxtqtPVJphbOMopn6TWFH-ww@mail.gmail.com>;
>>    Mitsutoshi NAKANO <[email protected]> wrote
>>    as Subject "[tsunagi 34] please review and test new tamago-tsunagi (was: egg-simで "Invalid code(s)")":
>>
>>> 上記mail
>>> http://sourceforge.jp/projects/tamago-tsunagi/lists/archive/misc/2015-January/000029.html
>>> の件で、tamago-tsunagiを修正してみました。
>>> あらいさんがおっしゃるとおり、egg-sim.elの(make-char-list)の
>>> (make-char)がエラーを発していましたので
>>> (ignore-errors)で囲ってみました。
>>>
>>> ISO-8859-3に文字が定義されていない点があり、
>>> そこで(make-char)がエラーを返していたようです。
>>> http://en.wikipedia.org/wiki/ISO/IEC_8859-3
>>>
>>> simを起動すると未定義のところはnilになっており、
>>> それを無理に入力しようとするとエラーになりますが、
>>> 一応、動かないという状態は脱したように思われます。
>>
>>  私もその後調べて、なんとかエラーを出さないようにできないか頑張ってみ
>> たのですが、挫折しました。

>
> あらいさんはご自身のコードのどの辺に問題を感じてらっしゃるのでしょうか?
>
>
> というわけでtestとreviewのご依頼をあちこちのMLに投げましたが、
> あらいさんの修正の方が採用される可能性があります。 >各位

あらいさんのpatchを参考にして、こちらでもegg-sim.elを
さらに書きなおしてみました。
あらいさんが(condition-case)を使っているのに対して、
私は(ignore-errors)を使っているだけです。

https://github.com/MItsutoshiNAKANO/tamago-tsunagi-draft2
の
branch 20150129-fix-egg-sim-Arai-NAKANO-Spike
に最新のソースがあります。
version tsunagi-5.0.4.0を名乗っています。

あらいさんの挫折・懸念事項を教えてくださるようお願いいたします。

特に問題なければ近日中にこれをmaster branchに取り込み、
http://sourceforge.jp/projects/tamago-tsunagi/scm/git/tamago-tsunagi/
の master branchにも取り込み、tagを打ってtarballを生成します。

-- 
Mitsutoshi NAKANO <[email protected]> <[email protected]>
 <https://twitter.com/ItSANgo> <http://d.hatena.ne.jp/Itisango/>
ただ今就職活動中。

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-users-jp
To unsubscribe, send any mail to "[email protected]"
0000-fix-sim-Arai-suggested.patch (text/x-patch, 3.8 KB)
diff --git a/ChangeLog b/ChangeLog
index 38af4b3..1135e30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2015-01-29  Mitsutoshi NAKANO  <[email protected]>
+
+	* egg-sim.el(make-char-list):
+	ARAI Shun-ichi <[email protected]> wrote better fix.
+	https://sourceforge.jp/projects/tamago-tsunagi/lists/archive/misc/2015-January/000036.html
+	So Mitsutoshi rewrote.
+	* egg-sim.el: added ARAI Shun-ichi <[email protected]> to copyright
+	* NEWS(5.0.4.0): announced new sim.
+	* egg.el(egg-version): up from 5.0.2.0 to 5.0.4.0
+	* egg.el: added Mitsutoshi to copyright
+	
+
 2015-01-28  Mitsutoshi NAKANO  <[email protected]>
 
 	* egg-sim.el(make-char-list): ignore-errors in make-char
diff --git a/NEWS b/NEWS
index 0657d7e..9f0a567 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,12 @@
 NEWS about tamago-tsunagi
 =========================
 
+## 5.0.4.0 Mitsutoshi NAKANO <[email protected]> rewrote sim.
+ARAI Shun-ichi <[email protected]> suggested better fix.
+https://sourceforge.jp/projects/tamago-tsunagi/lists/archive/misc/2015-January/000036.html
+So Mitsutoshi wewrote sim.
+Now, the sim skips void chars in the charsets.
+
 ## 5.0.2.0 Mitsutoshi NAKANO <[email protected]>
 
 HotFix: C-^ (egg-sim) does not work.  So amended quickly.
diff --git a/egg-sim.el b/egg-sim.el
index 54343d7..f5976b6 100644
--- a/egg-sim.el
+++ b/egg-sim.el
@@ -5,7 +5,7 @@
 ;; Licensed to the Free Software Foundation.
 ;; Copyright (C) 2000 TOMURA Satoru <[email protected]>
 ;;               2015 Mitsutoshi NAKANO <[email protected]>
-
+;;               2015 ARAI Shun-ichi <[email protected]>
 ;; Author: TOMURA Satoru <[email protected]>
 
 ;; Keywords: mule, multilingual, input method
@@ -42,11 +42,15 @@
 
 (provide 'egg-sim)
 
-;;; modified 2015.01.28 Mitsutoshi NAKANO <[email protected]>
+;;;; modified 2015.01.28 Mitsutoshi NAKANO <[email protected]>
 ;;; ignore-errors in make-char
 ;;; Please see:
 ;;; http://sourceforge.jp/projects/tamago-tsunagi/lists/archive/misc/2015-January/000029.html
 ;;; http://www.gnu.org/software/emacs/manual/html_node/elisp/Handling-Errors.html
+;;;; modified 2015.01.29 Mitsutoshi NAKANO <[email protected]>
+;;; ARAI Shun-ichi <[email protected]> wrote better fix.
+;;; https://sourceforge.jp/projects/tamago-tsunagi/lists/archive/misc/2015-January/000036.html
+;;; So Mitsutoshi rewrote.
 (defun make-char-list (charset &optional from to)
   (let ((result nil)
 	(chars (charset-chars charset))
@@ -59,20 +63,20 @@
 	 (<= to max)
 	 (cond ((= (charset-dimension charset) 1)
 		(while (<= from to)
-		  (setq result (cons (ignore-errors (char-to-string
-						     (make-char charset to)))
-				     result)
-			to (1- to)))
+		  (ignore-errors
+		    (setq result (cons (char-to-string (make-char charset to))
+				       result)))
+		  (setq to (1- to)))
 		result)
 	       ((= (charset-dimension charset) 2)
 		(while (<= from to)
 		  (let ((code max))
 		    (while (<= min code)
-		      (setq result (cons (ignore-errors
-					  (char-to-string
-					   (make-char charset to code)))
-					 result)
-			    code (1- code))))
+		      (ignore-errors
+			(setq result (cons (char-to-string
+					    (make-char charset to code))
+					   result)))
+		      (setq code (1- code))))
 		  (setq to (1- to)))
 		result)))))
 
diff --git a/egg.el b/egg.el
index 4d29251..56e68ae 100644
--- a/egg.el
+++ b/egg.el
@@ -1,6 +1,7 @@
 ;;; egg.el --- EGG Input Method Architecture
 
 ;; Copyright (C) 1999-2015 Free Software Foundation, Inc
+;;               2014, 2015 Mitsutoshi NAKANO <[email protected]>
 
 ;; Author: NIIBE Yutaka <[email protected]>
 ;;         KATAYAMA Yoshio <[email protected]>
@@ -28,7 +29,7 @@
 
 ;;; Code:
 
-(defconst egg-version "5.0.2.0"
+(defconst egg-version "5.0.4.0"
   "Version number for this version of Tamago.")
 
 (defconst egg-tsunagi-version egg-version
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.