Hi,
The emacs-anthy package, that runs with the anthy package, is
probably one of the easiest ways to do writing Japanese text
with Emacs even now. A thing a user needs to add to the Emacs
init file is just: (require 'anthy)
However, some modules are outdated and do not work with the
modern Emacs like what Cygwin distributes. So, I post a minimal
patch to make the emacs-anthy package work. Where `minimal'
means that it doesn't contain feature modifications of any kind,
and leaves some warnings that Emacs issues when compiling.
Regards,
Note: anthy.elc and anthy-dic.elc should be rebuilt after
applying the patch by M-x byte-compile-file .
--- a/anthy-dic.el 2013-11-01 06:55:43 +0000
+++ b/anthy-dic.el 2025-08-04 05:44:06 +0000
@@ -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)
--- a/anthy.el 2013-11-01 06:55:43 +0000
+++ b/anthy.el 2025-08-04 05:44:06 +0000
@@ -71,7 +71,7 @@
(defvar anthy-highlight-face nil)
(defvar anthy-underline-face nil)
(copy-face 'highlight 'anthy-highlight-face)
-(set-face-underline-p 'anthy-highlight-face t)
+(set-face-attribute 'anthy-highlight-face nil :underline t)
(copy-face 'underline 'anthy-underline-face)
;;
@@ -161,11 +161,11 @@
;; From skk-macs.el From viper-util.el. Welcome!
(defmacro anthy-deflocalvar (var default-value &optional documentation)
- (` (progn
- (defvar (, var) (, default-value)
- (, (format "%s\n\(buffer local\)" documentation)))
- (make-variable-buffer-local '(, var))
- )))
+ `(progn
+ (defvar ,var ,default-value
+ ,(format "%s\n(buffer local)" documentation))
+ (make-variable-buffer-local ',var)
+ ))
;; buffer local variables
(anthy-deflocalvar anthy-context-id nil "コンテキストのid")
@@ -745,7 +745,7 @@
(if anthy-agent-process
(kill-process anthy-agent-process))
(setq anthy-agent-process proc)
- (process-kill-without-query proc)
+ (set-process-query-on-exit-flag proc nil)
(if anthy-xemacs
(if (coding-system-p (find-coding-system 'euc-japan))
(set-process-coding-system proc 'euc-japan 'euc-japan))
@@ -864,7 +864,7 @@
;; leim の activate
;;
(defun anthy-leim-activate (&optional name)
- (setq inactivate-current-input-method-function 'anthy-leim-inactivate)
+ (setq deactivate-current-input-method-function 'anthy-leim-inactivate)
(setq anthy-leim-active-p t)
(anthy-update-mode)
(when (eq (selected-window) (minibuffer-window))
@@ -874,7 +874,7 @@
;; emacsのバグ避けらしいです
;;
(defun anthy-leim-exit-from-minibuffer ()
- (inactivate-input-method)
+ (deactivate-input-method)
(when (<= (minibuffer-depth) 1)
(remove-hook 'minibuffer-exit-hook 'anthy-leim-exit-from-minibuffer)))
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple