Sunday, March 31, 2019

Fix inputmethod/anthy "add-word-dictionary" to work

Hi,

anthy uses "string-to-int" which seems have been obsolete in emacs.
This problem prevented me from adding new era name.

ok?

Index: inputmethods/anthy/Makefile
===================================================================
RCS file: /cvs/ports/inputmethods/anthy/Makefile,v
retrieving revision 1.23
diff -u -p -r1.23 Makefile
--- inputmethods/anthy/Makefile 28 Mar 2019 02:03:27 -0000 1.23
+++ inputmethods/anthy/Makefile 1 Apr 2019 05:08:51 -0000
@@ -8,7 +8,7 @@ DISTNAME = anthy-$V
PKGNAME-main = anthy-$V
PKGNAME-emacs = emacs-anthy-$V
REVISION-main = 2
-REVISION-emacs = 3
+REVISION-emacs = 4

SHARED_LIBS += anthydic 1.0 # .1.0
SHARED_LIBS += anthy 1.0 # .1.0
Index: inputmethods/anthy/patches/patch-src-util_anthy-dic_el
===================================================================
RCS file: inputmethods/anthy/patches/patch-src-util_anthy-dic_el
diff -N inputmethods/anthy/patches/patch-src-util_anthy-dic_el
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ inputmethods/anthy/patches/patch-src-util_anthy-dic_el 1 Apr 2019 05:08:51 -0000
@@ -0,0 +1,29 @@
+$OpenBSD$
+
+Index: src-util/anthy-dic.el
+--- src-util/anthy-dic.el.orig
++++ src-util/anthy-dic.el
+@@ -1,4 +1,4 @@
+-;; anthy-dic.el -- Anthy
++; anthy-dic.el -- Anthy
+
+ ;; Copyright (C) 2001 - 2005
+ ;; Author: Yusuke Tabata<yusuke@w5.dion.ne.jp>
+@@ -70,7 +70,7 @@
+ (defun anthy-dic-get-special-noun-category (word)
+ (let
+ ((res '())
+- (cat (string-to-int
++ (cat (string-to-number
+ (read-from-minibuffer "1:人名 2:地名: "))))
+ (cond ((= cat 1)
+ (setq res '(("品詞" "人名"))))
+@@ -113,7 +113,7 @@
+ (and (string= word "")
+ (setq word (read-from-minibuffer "単語(語幹のみ): ")))
+ (setq yomi (read-from-minibuffer (concat "読み (" word "): ")))
+- (setq cat (string-to-int
++ (setq cat (string-to-number
+ (read-from-minibuffer
+ "カテゴリー 1:一般名詞 2:その他の名詞 3:形容詞 4:副詞: ")))
+ (cond ((= cat 1)

No comments:

Post a Comment