OSDN Git Service

*** empty log message ***
authorkate <kate>
Mon, 22 Jul 2002 13:18:56 +0000 (13:18 +0000)
committerkate <kate>
Mon, 22 Jul 2002 13:18:56 +0000 (13:18 +0000)
12 files changed:
ChangeLog
egg-cnv.el
egg.el
egg/canna.el
egg/sj3.el
egg/wnn.el
egg/wnnrpc.el
eggrc
its-keydef.el
its.el
its/aynu.el
its/pinyin.el

index 06ee86b..c7a352e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,81 @@
        * egg.el (egg-activate-keymap-after-command): set-buffer to
        killed buffer.
 
+2002-05-08  Katsumi Yamaoka  <yamaoka@jpl.org> (cf. [mule-ja:08306])
+
+       * its.el (its-next-line, its-previous-line): New commands;
+       substitute key definitions for `next-line' and `previous-line'
+       with them in `its-mode-map'.
+
+2001-12-01  ?
+
+       * egg/wnn.el (wnn-server-info-list): Use `defvar' instead of
+       `defconst' to define it.
+
+2001-12-01  KATAYAMA Yoshio  <kate@pfu.fujitsu.com>
+
+       * egg-x0213.el: New file.
+
+2001-11-10  Kinji Itoh  <kinji-i@gray.plala.or.jp>
+       (cf. http://cgi18.plala.or.jp/nyy/canna/canna-20011023-20011110.diff)
+
+       * egg/canna.el (canna-server-port): Default to the string "canna".
+       (cannna-open): Treat the port name as a string instead of a number.
+
+2001-11-08  Kinji Itoh  <kinji-i@gray.plala.or.jp> (cf. [tamago:00546])
+
+       * egg/canna.el (canna-set-converted-yomi): New function.
+       (canna-start-conversion): Use it.
+       (canna-change-bunsetsu-length): Use it.
+
+2001-10-22  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
+       (cf. [tamago:00534])
+
+       * egg/canna.el (canna-word-delete-regist): Signal an error using
+       `egg-error' if there is no text for yomi.
+
+2001-08-16  KATAYAMA Yoshio  <kate@pfu.fujitsu.com> (cf. [tamago:00516])
+
+       * its/greek.el: New file.
+
+2001-07-24  KATAYAMA Yoshio  <kate@pfu.fujitsu.com> (cf. [tamago:00504])
+
+       * eggrc (wnn7-jserver-setup): New function.
+
+2001-06-28  Yoshiki Hayashi  <yoshiki@xemacs.org> (cf. [tamago:00468])
+
+       * egg-cnv.el (egg-end-of-conversion-buffer): Replace
+       `next-single-property-change' to `egg-next-single-property-change'.
+       (egg-decide-before-point): Ditto.
+       (egg-exit-conversion): Ditto.
+       (egg-abort-conversion): Ditto.
+
+       * egg.el (egg-last-method-name): Default to nil.
+
+       * its-keydef.el: Set the default value of `its-select-func-alist'
+       to nil.
+
+       * its.el (its-current-language): Default to nil.
+       (its-mode-map): Use `(meta KEY)' instead of `M-KEY'.
+
+       * egg/canna.el (canna-open): Use `binary' instead of
+       `no-conversion' for the process coding-system.
+       * egg/sj3.el (sj3-open): Ditto.
+       * egg/wnn.el (wnn-open): Ditto.
+
+       * egg/wnnrpc.el (wnnrpc-with-temp-buffer): Use `binary' instead of
+       `no-conversion'.
+       (wnnrpc-with-write-file): Ditto.
+
+2001-05-24  KATAYAMA Yoshio  <kate@pfu.fujitsu.com> (cf. [tamago:00462])
+
+       * its/aynu.el: Require `cl' when compiling.
+
+2001-05-23  Katsumi Yamaoka  <yamaoka@jpl.org> (cf. [tamago:00461])
+
+       * egg.el: Require `cl' only when compiling.
+       * its.el: Ditto.
+
 2001-05-22  KATAYAMA Yoshio <kate@pfu.fujitsu.com>
 
        * its.el (its-delete-by-character): New customizable variable.
@@ -20,8 +95,8 @@
        * egg-cnv.el (egg-convert-region): Change the value of invisible
        property to egg.
 
-        * jisx0213.el: Correct JIS X 0213 definition. (suggested by
-        T. Kawabata)
+       * jisx0213.el: Correct JIS X 0213 definition. (suggested by
+       T. Kawabata)
 
 2000-06-02  KATAYAMA Yoshio <kate@pfu.co.jp>
 
 2000-02-01  Takanori Saneto  <sanewo@ba2.so-net.ne.jp>
 
        * egg/sj3rpc.el (sj3rpc-tanbunsetsu-conversion): should use
-         let* instead of let.
+       let* instead of let.
 
 2000-01-20  Katsumi Yamaoka <yamaoka@jpl.org>
 
 
 2000-01-17  TOMURA Satoru <tomura@etl.go.jp>
 
-       * Version 4.0.6 released
-       
+       * Version 4.0.6 released.
+
 2000-01-17  TOMURA Satoru <tomura@etl.go.jp>
 
        * README.ja.text: mentiond about doc/lc99.text
-       
+
 2000-01-17  KATAYAMA Yoshio <kate@pfu.co.jp>
 
        * its.el (its-hiragana, its-katanaka): modified
        (its-japanese-hankaku): added.
        (its-convert): added.
        * egg.el (egg-redraw-face): bug fixed.
-       
+
 2000-01-17  SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
-       
+
        * its.el (its-hiragana, its-katakana): re-added.
-       
+
 2000-01-17  SANETO Takanori <sanewo@ba2.so-net.ne.jp>
 
        * Makefile.in: move its-keydefs.el from ITSELS to TOPELS
-       
+
 2000-01-16
-       
+
        * egg-sim.el: many functions renamed and modified...
        * doc/code-table: created
-       
+
 2000-01-15  TOMURA Satoru <tomura@etl.go.jp>
-       
+
        * egg-sim.el: rename egg-code.el as egg-sim.el
        * egg-sim.el (egg-simple-input-method): rename
        egg-insert-character as egg-simple-input-method
        * egg.el: rename egg-insert-character as egg-simple-input-method
        * doc/lc99.txt: added.
-       
+
 2000-01-14  TOMURA Satoru <tomura@etl.go.jp>
        * egg-code.el: created
        * egg.el: Bind egg-insert-character to C-^ in egg-mode
        * egg.el: Delete the binding for C-_ in egg-mode
        * Makefile.in: add egg-code to ${SRCS}
-       
+
 2000-01-13  TOMURA Satoru <tomura@etl.go.jp>
-       
+
        * Version 4.0.5 released.
 
 2000-01-13  Katsumi Yamaoka <yamaoka@jpl.org>
-       
+
        * egg/sj3.el (sj3-end-conversion): Restrain from overrunning.
-       
+
 2000-01-13  Katsumi Yamaoka <yamaoka@jpl.org>
+
        * egg/sj3rpc.el (sj3rpc-open): Use `sj3-server-version' instead of
        2.
        (sj3rpc-unpack-mb-string): New macro.
 
        * its.el: typo
        * egg.el: typo
-       
+
 2000-01-13  KATAYAMA Yoshio <kate@pfu.co.jp>
 
        * its.el(its-hiragana, its-katakana): does not work. so deleted.
-       
-2000-01-12  NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp>   
+
+2000-01-12  NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp>
 
        * README.ja.txt: typo
        * Makefile.in: (clean, distclean): modified.
 
 2000-01-12  TOMURA Satoru <tomura@etl.go.jp>
-       
+
        * Version 4.0.4 released.
-       
+
 2000-01-12  TOMURA Satoru <tomura@etl.go.jp>
 
        * REAMDE: removed.
-       
+
        * README.ja.txt: created.
-       
+
 2000-01-12  SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
 
        * Makefile.in: "clean" removes ${ELCS}.
-       
+
        * Makefile.in: "distclean" created.
-       
+
 2000-01-12  Satoru Tomura  <tomura@etl.go.jp>
 
        * Version 4.0.3 released.
-       
+
 2000-01-12  Satoru Tomura  <tomura@etl.go.jp>
 
        * install-sh: copied from automake distribution
        * Makefile.in: created
 
        * configure: generated by autoconf
-       
+
 2000-01-11  Satoru Tomura  <tomura@etl.go.jp>
 
        * leim-list.el: (defgroup sj3) added.
 
 2000-01-11  Katsumi Yamaoka <yamaoka@jpl.org>
 
-       * egg/sj3.el : (require 'egg) added.
+       * egg/sj3.el: (require 'egg) added.
 
 2000-01-11  SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp>
-       
+
        * its.el (its-hiragana, its-katakana): New functions
-       
+
 2000-01-07  Tomura Satoru   <tomura@etl.go.jp>
-       
+
        * COPYING: The file is added.
-       
+
        * ChangeLog.1: The original ChangeLog is renamed as.
-       
+
        * ChangeLog: Created.
-       
+
 2000-01-07  Tomura Satoru   <tomura@etl.go.jp>
-       
+
        * Version 4.0.2 released.
-       
+
 2000-01-06  Tomura Satoru   <tomura@etl.go.jp>
-       
+
        * Version 4.0.1 released.
-       
+
 2000-01-05  Tomura Satoru   <tomura@etl.go.jp>
-       
-       * Version 4.0.0 released.
-       
 
+       * Version 4.0.0 released.
index 5ad9577..e6aa097 100644 (file)
@@ -157,7 +157,7 @@ mode, if non-NIL."
            pair (assq lang egg-conversion-backend-alist))
       (cond
        ((null pair)
-       (setq egg-conversion-backend-alist 
+       (setq egg-conversion-backend-alist
              (cons (cons lang backend-set) egg-conversion-backend-alist)))
        (force
        (setcdr pair backend-set))))))
@@ -259,7 +259,7 @@ mode, if non-NIL."
   (egg-decide-candidate (bunsetsu-list candidate-pos prev-b next-b))
   (egg-special-candidate (bunsetsu-list prev-b next-b major type))
   (egg-change-bunsetsu-length (bunsetsu-list prev-b next-b length major))
-  (egg-bunsetsu-combinable-p (bunsetsu next-b)) 
+  (egg-bunsetsu-combinable-p (bunsetsu next-b))
   (egg-end-conversion (bunsetsu-list abort))
   (egg-word-inspection (bunsetsu))
   (egg-word-registration (backend source converted))))
@@ -517,7 +517,7 @@ mode, if non-NIL."
              file (and (file-readable-p file) file))
       (while (and (null file) path)
        (if (stringp (car path))
-           (setq file (substitute-in-file-name 
+           (setq file (substitute-in-file-name
                        (expand-file-name filename (car path)))
                  file (and (file-exists-p file) file)))
        (setq path (cdr path)))
@@ -667,13 +667,13 @@ mode, if non-NIL."
    ((null (get-text-property (1- (point)) 'egg-start))
     (goto-char (previous-single-property-change (point) 'egg-start)))))
 
-(defun egg-end-of-conversion-buffer(n)
+(defun egg-end-of-conversion-buffer (n)
   (interactive "p")
   (cond
    ((<= n 0)
     (egg-beginning-of-conversion-buffer 1))
    (t
-    (goto-char (next-single-property-change (point) 'egg-end))
+    (goto-char (egg-next-single-property-change (point) 'egg-end))
     (backward-char))))
 
 (defun egg-backward-bunsetsu (n)
@@ -892,7 +892,7 @@ mode, if non-NIL."
       (setq egg-candidate-select-counter (1+ egg-candidate-select-counter))
     (setq egg-candidate-select-counter 1))
   (if (= egg-candidate-select-counter egg-conversion-auto-candidate-menu)
-      (egg-select-candidate-internal 
+      (egg-select-candidate-internal
        nil egg-conversion-auto-candidate-menu-show-all
        b prev-b next-b major)
     (setq this-command (if major 'egg-candidate-major 'egg-candidate-minor))
@@ -911,7 +911,7 @@ mode, if non-NIL."
         ((< i nitem))                  ; OK
         (egg-conversion-wrap-select    ; go backward as if it is ring
          (setq i (% i nitem)))
-        (t                             ; don't go forward 
+        (t                             ; don't go forward
          (setq i (1- nitem)
                beep t)))
        (setq new-b (egg-decide-candidate b i prev-b next-b))
@@ -1107,13 +1107,13 @@ mode, if non-NIL."
                  (previous-single-property-change (point) 'egg-start)))
         (end (if (get-text-property (point) 'egg-end)
                  (point)
-               (next-single-property-change (point) 'egg-end)))
+               (egg-next-single-property-change (point) 'egg-end)))
         (decided (buffer-substring start (point)))
         (undecided (buffer-substring (point) end))
         i len bunsetsu source context)
     (delete-region
      (previous-single-property-change start 'egg-start nil (point-min))
-     (next-single-property-change end 'egg-end nil (point-max)))
+     (egg-next-single-property-change end 'egg-end nil (point-max)))
     (setq i 0
          len (length decided))
     (while (< i len)
@@ -1153,11 +1153,11 @@ mode, if non-NIL."
                  (previous-single-property-change (point) 'egg-start)))
         (end (if (get-text-property (point) 'egg-end)
                  (point)
-               (next-single-property-change (point) 'egg-end)))
+               (egg-next-single-property-change (point) 'egg-end)))
         (bunsetsu (egg-get-bunsetsu-info start)))
     (delete-region
      (previous-single-property-change start 'egg-start nil (point-min))
-     (next-single-property-change end 'egg-end nil (point-max)))
+     (egg-next-single-property-change end 'egg-end nil (point-max)))
     (egg-end-conversion (list bunsetsu) nil)
     (insert (egg-string-to-char-at (egg-get-bunsetsu-converted bunsetsu) 0))))
 
@@ -1165,7 +1165,7 @@ mode, if non-NIL."
   (interactive)
   (if (egg-conversion-fence-p)
       (progn
-       (goto-char (next-single-property-change (point) 'egg-end))
+       (goto-char (egg-next-single-property-change (point) 'egg-end))
        (egg-decide-before-point))))
 
 (defun egg-abort-conversion ()
@@ -1179,8 +1179,8 @@ mode, if non-NIL."
                'egg-start nil (point-min)))
     (setq source (get-text-property (point) 'egg-source)
          context (get-text-property (point) 'egg-context))
-    (delete-region (point) (next-single-property-change
-                           (next-single-property-change (point) 'egg-end)
+    (delete-region (point) (egg-next-single-property-change
+                           (egg-next-single-property-change (point) 'egg-end)
                            'egg-end nil (point-max)))
     (its-restart source nil nil context)))
 
@@ -1248,4 +1248,5 @@ mode, if non-NIL."
     (help-setup-xref (cons #'help-xref-mode (current-buffer)) (interactive-p))))
 
 (provide 'egg-cnv)
-;;; egg-cnv.el ends here.
+
+;;; egg-cnv.el ends here
diff --git a/egg.el b/egg.el
index 3bb95e7..b4d88e2 100644 (file)
--- a/egg.el
+++ b/egg.el
@@ -30,6 +30,9 @@
 
 ;;; Code:
 
+(defconst egg-version "4.0.6"
+  "Version number for this version of Tamago.")
+
 (eval-when-compile
   (require 'cl))
 
@@ -47,7 +50,7 @@
 
 (defvar egg-default-language)
 
-(defvar egg-last-method-name)
+(defvar egg-last-method-name nil)
 (make-variable-buffer-local 'egg-last-method-name)
 (put 'egg-last-method-name 'permanent-local t)
 
        (funcall auto-fill-function)
        (while (and (< fill-column (current-column))
                    (< (current-column) ocolumn))
-         (setq ocolumn (current-column))
+         (setq ocolumn (current-column))
          (funcall auto-fill-function)))))
 
 (eval-when (eval load)
index 205ff17..acb5d4a 100644 (file)
@@ -41,9 +41,9 @@
   "Hostname of CANNA server"
   :group 'canna :type 'string)
 
-(defcustom canna-server-port 5680
-  "Port number of CANNA server"
-  :group 'canna :type 'integer)
+(defcustom canna-server-port "canna"
+  "A service name or a port number (should be a string) of CANNA server"
+  :group 'canna :type 'string)
 
 (defcustom canna-user-name nil
   "User Name on CANNA server"
@@ -283,7 +283,7 @@ katakana to candidates list. NOSTUDY specifies not study."
       (canna-arg-type-error canna-define-environment))
   (setq canna-current-envspec (canna-envspec-create env-name
                                                    convert-mode nostudy)
-       canna-envspec-list (nconc canna-envspec-list 
+       canna-envspec-list (nconc canna-envspec-list
                                  (list canna-current-envspec))))
 
 (defun canna-add-dict (dict dict-rw)
@@ -328,8 +328,10 @@ katakana to candidates list. NOSTUDY specifies not study."
                  hostname-list (cdr hostname-list))
            (if (null (string-match ":" hostname))
                (setq port canna-server-port)
-             (setq port (string-to-int (substring hostname (match-end 0)))
+             (setq port (substring hostname (match-end 0))
                    hostname (substring hostname 0 (match-beginning 0))))
+           (if (and (stringp port) (string-match "^[0-9]+$" port))
+               (setq port (string-to-int port)))
            (and (equal hostname "")
                 (setq hostname (or (getenv "CANNAHOST") "localhost")))
            (let ((inhibit-quit save-inhibit-quit))
@@ -345,7 +347,7 @@ katakana to candidates list. NOSTUDY specifies not study."
                ((error quit))))
            (when proc
              (process-kill-without-query proc)
-             (set-process-coding-system proc 'no-conversion 'no-conversion)
+             (set-process-coding-system proc 'binary 'binary)
              (set-process-sentinel proc 'canna-comm-sentinel)
              (set-marker-insertion-type (process-mark proc) t)
              (setq result (cannarpc-open proc user-name)) ;; result is context
@@ -379,7 +381,7 @@ katakana to candidates list. NOSTUDY specifies not study."
   "Return the backend of CANNA environment."
   (let ((env (canna-search-environment backend))
        proc context error)
-    (or env    
+    (or env
        (unwind-protect
            (let* ((language (canna-backend-get-language backend))
                   specs)
@@ -470,6 +472,17 @@ katakana to candidates list. NOSTUDY specifies not study."
 (defun canna-init ()
   )
 
+(defun canna-set-converted-yomi (bunsetsu-pos bunsetsu-list)
+  (let ((bl bunsetsu-list)
+       (i bunsetsu-pos)
+       b)
+    (while bl
+      (setq b (car bl))
+      (canna-bunsetsu-set-source b (cannarpc-get-bunsetsu-source env i))
+      (setq i (1+ i)
+           bl (cdr bl)))
+    bunsetsu-list))
+
 (defun canna-start-conversion (backend yomi &optional context)
   "Convert YOMI string to kanji, and enter conversion mode.
 Return the list of bunsetsu."
@@ -482,7 +495,7 @@ Return the list of bunsetsu."
          (setq env (canna-get-environment backend))
                (canna-finalize-backend)))
          (setq bunsetsu-list (cannarpc-begin-conversion env yomi))))
-    bunsetsu-list))
+    (canna-set-converted-yomi 0 bunsetsu-list)))
 
 (defun canna-end-conversion (bunsetsu-list abort)
   (let* ((env (canna-bunsetsu-get-env (car bunsetsu-list)))
@@ -586,7 +599,9 @@ Return the list of bunsetsu."
         (bunsetsu-pos (canna-bunsetsu-get-bunsetsu-pos (car bunsetsu)))
         new)
     (if yomi-length
-       (setq new (cannarpc-set-kugiri-changed env yomi-length bunsetsu-pos))
+       (setq new (canna-set-converted-yomi
+                  bunsetsu-pos
+                  (cannarpc-set-kugiri-changed env yomi-length bunsetsu-pos)))
       (setq new bunsetsu))
     (list (list (car new)) prev-b (cdr new))))
 
@@ -778,7 +793,7 @@ Return the list of bunsetsu."
                          (intern (concat "canna-hinshi-" (symbol-name key)))
                          kanji yomi))
          ((stringp key) (cdr (assoc key canna-hinshi-alist))))))
-       
+
 (defun canna-word-registration (backend kanji yomi)
   "Register a word KANJI with a pronunciation YOMI."
   (if (or (null (eq (egg-get-language 0 kanji)
@@ -807,6 +822,8 @@ Return the list of bunsetsu."
 
 (defun canna-word-delete-regist (backend yomi)
   "Delete a word KANJI from dictionary."
+  (if (= (length yomi) 0)
+      (egg-error "Canna word delete registration: null string"))
   (let* ((env (canna-get-environment backend))
         (dic (canna-dictionary-select env))
         proc context envd bunsetsu bunsetsu-pos z zpos kouho-list hinshi i
index 61d7249..e5e5264 100644 (file)
@@ -147,7 +147,7 @@ Don't specify the optional arguments in normal use."
       ((error quit)
        (egg-error "failed to connect sj3 server")))
     (process-kill-without-query proc)
-    (set-process-coding-system proc 'no-conversion 'no-conversion)
+    (set-process-coding-system proc 'binary 'binary)
     (set-marker-insertion-type (process-mark proc) t)
     (save-excursion
       (set-buffer buf)
@@ -198,7 +198,7 @@ Don't specify the optional arguments in normal use."
 ;;       (if proc
 ;;       (progn
 ;;         (process-kill-without-query proc)
-;;         (set-process-coding-system proc 'no-conversion 'no-conversion)
+;;         (set-process-coding-system proc 'binary 'binary)
 ;;         (set-marker-insertion-type (process-mark proc) t)
 ;;         ;; Initialize dictionaries
 ;;         (setq sj3-sys-dict-list nil)
index 6985278..0f2a5ea 100644 (file)
@@ -390,13 +390,12 @@ by ':' and digit N."
 
 ;; <wnn-bunsetsu> ::= [ <env>
 ;;                      <jirilen> <dic-no> <entry> <freq> <right-now> <hinshi>
-;;                             <status> <status-backward> <kangovect> <evaluation>
-;;                             <converted> <yomi> <fuzokugo>
-;;                             <dai-evaluation> <dai-continue> <change-top>
-;;                             <zenkouho-info> <freq-down> <fi-rel> <context> ]
+;;                      <status> <status-backward> <kangovect> <evaluation>
+;;                      <converted> <yomi> <fuzokugo>
+;;                      <dai-evaluation> <dai-continue> <change-top>
+;;                      <zenkouho-info> <freq-down> <fi-rel> <context> ]
 ;;
 ;; <zenkouho-info> ::= [ <pos> <list> <converted> <dai> <prev-b> <nxet-b> ]
-;;                    
 
 (defsubst wnn-bunsetsu-create (env jirilen dic-no entry freq right-now hinshi
                               status status-backward kangovect evaluation)
@@ -661,7 +660,7 @@ Return the list of bunsetsu."
 (defmacro wnn-uniq-hash-string (uniq-level)
   `(mapconcat
     (lambda (b)
-      (concat ,@(cond ((eq uniq-level 'wnn-uniq) 
+      (concat ,@(cond ((eq uniq-level 'wnn-uniq)
                       '((number-to-string (wnn-bunsetsu-get-hinshi b))))
                      ((eq uniq-level 'wnn-uniq-entry)
                       '((number-to-string (wnn-bunsetsu-get-dic-no b))
@@ -989,7 +988,7 @@ Return the list of bunsetsu."
                                              (wnn-bunsetsu-get-right-now b)
                                              (wnn-bunsetsu-get-freq b))
                          context))
-      (wnnrpc-set-frequency env dic-no entry 
+      (wnnrpc-set-frequency env dic-no entry
                            (WNN-const IMA_ON) (WNN-const HINDO_INC)))
     (list (car context) (nth 1 context))))
 
@@ -1210,7 +1209,7 @@ Return the list of bunsetsu."
        (proc-name (wnn-server-proc-name server-info))
        (msg-form "Wnn: connecting to %S at %s...")
        (user-name (user-login-name))
-       buf hostname myname port-off proc result msg)
+       buf hostname myname port-off proc result msg)
     (unwind-protect
        (progn
          (setq buf (generate-new-buffer (wnn-server-buffer-name server-info)))
@@ -1246,7 +1245,7 @@ Return the list of bunsetsu."
                ((error quit))))
            (when proc
              (process-kill-without-query proc)
-             (set-process-coding-system proc 'no-conversion 'no-conversion)
+             (set-process-coding-system proc 'binary 'binary)
              (set-process-sentinel proc 'wnn-comm-sentinel)
              (set-marker-insertion-type (process-mark proc) t)
              (setq result (wnnrpc-open proc myname user-name))
@@ -1347,7 +1346,7 @@ is non-NIL."
   (setq env-name (if reverse (concat env-name "R") env-name)
        wnn-current-envspec (wnn-envspec-create env-name tankan stickey)
        wnn-current-envspec-reverse reverse
-       wnn-envspec-list (nconc wnn-envspec-list 
+       wnn-envspec-list (nconc wnn-envspec-list
                                (list wnn-current-envspec))))
 
 (defun wnn-set-fuzokugo (filename)
@@ -1430,7 +1429,7 @@ is non-NIL."
                               dict freq nil dict-rw freq-rw
                               dict-passwd freq-passwd nil))
 
-(defun wnn-add-notrans-dict (dict priority dict-rw 
+(defun wnn-add-notrans-dict (dict priority dict-rw
                             &optional dict-passwd &rest reverse)
   (wnn-wnn6-env-func wnn-add-notrans-dict)
   (wnn-add-dict-param-check wnn-add-notrans-dict
@@ -1776,7 +1775,7 @@ On failure, return negative error code."
             (wnn-create-frequency env fi did fname "" fpass))
        (message (egg-get-message 'wnn-re-create-freq) fname)
        (and (>= (setq fid (wnn-open-file env fname)) 0)
-            (>= (wnnrpc-set-dictionary env 
+            (>= (wnnrpc-set-dictionary env
                                        did fid prior drw frw
                                        dpass fpass rev)
                 0))))))))
index 8fcc98d..5de060b 100644 (file)
          ((eq c 'WNN_NOT_A_FILE)          98)
          ((eq c 'WNN_INODE_CHECK_ERROR)   99)
 
-         ((eq c 'WNN_UD_DICT)              2)
-         ((eq c 'WNN_REV_DICT)             3)
+         ((eq c 'WNN_UD_DICT)              2)
+         ((eq c 'WNN_REV_DICT)             3)
          ((eq c 'CWNN_REV_DICT)       ?\x103)
          ((eq c 'BWNN_REV_DICT)       ?\x203)
          ((eq c 'WNN_COMPACT_DICT)         5)
 
 (defun wnnrpc-connect (proc envname)
   "Establish new `connection' and make an environment.
-Return the identitifation of the environment on success, 
+Return the identitifation of the environment on success,
 or negative error code on failure."
   (comm-call-with-proc proc ()
     (comm-format (u s) (wnn-const JS_CONNECT) envname)
@@ -739,7 +739,7 @@ Return non-negative file ID on success, or negative error code on failure."
     (wnnrpc-get-result)))
 
 (defun wnnrpc-set-fuzokugo-file (env fid)
-  "For PROC, on environment ENV-ID, 
+  "For PROC, on environment ENV-ID,
 Set Fuzokugo file specified by FID.
 Return 0 on success, negate-encoded error code on failure."
   (wnnrpc-call-with-environment env ()
@@ -801,7 +801,7 @@ Return 0 on success, negate-encoded error code on faiulure."
     (comm-unpack (i) result)
     result))
 
-(defun wnnrpc-access (env path mode) 
+(defun wnnrpc-access (env path mode)
   "Check the accessibility of file in the environment ENV.
 Return 0 when the remote file (dictionary/frequency) of PATH on server
 can be accessed in mode MODE.  Return Non-zero otherwise."
@@ -1454,16 +1454,16 @@ HINSHI and FUZOKUGO are information of preceding bunsetsu."
 \f
 (defmacro wnnrpc-with-temp-buffer (&rest body)
   `(with-temp-buffer
-     (let ((coding-system-for-read 'no-conversion)
-          (coding-system-for-write 'no-conversion))
+     (let ((coding-system-for-read 'binary)
+          (coding-system-for-write 'binary))
        (set-buffer-multibyte nil)
        ,@body)))
 
 (defmacro wnnrpc-with-write-file (filename error-handler &rest body)
   `(condition-case error
        (with-temp-file ,filename
-        (let ((coding-system-for-read 'no-conversion)
-              (coding-system-for-write 'no-conversion))
+        (let ((coding-system-for-read 'binary)
+              (coding-system-for-write 'binary))
           (set-buffer-multibyte nil)
           ,@body))
      (file-error ,error-handler)))
@@ -1511,7 +1511,7 @@ HINSHI and FUZOKUGO are information of preceding bunsetsu."
     (cond ((null header)
           (- (wnn-const WNN_NOT_A_FILE)))
          ((null (car header))
-          (if (file-exists-p path) 
+          (if (file-exists-p path)
               (- (wnn-const WNN_OPENF_ERR))
             (- (wnn-const WNN_NO_EXIST))))
          (t
@@ -1638,7 +1638,7 @@ HINSHI and FUZOKUGO are information of preceding bunsetsu."
                (wnnrpc-terminate-current-command WNN_FILE_WRITE_ERROR))
               (t
                (wnnrpc-with-write-file local-filename
-                   (- (wnn-const WNN_FILE_WRITE_ERROR))            
+                   (- (wnn-const WNN_FILE_WRITE_ERROR))
                  (comm-call-with-proc proc ()
                    (comm-format (u) (wnn-const WNN_ACK))
                    (comm-unpack (B) contents))
@@ -1714,7 +1714,7 @@ HINSHI and FUZOKUGO are information of preceding bunsetsu."
                                             comment passwd hpasswd))
       0
     (- (wnn-const WNN_FILE_CREATE_ERROR))))
-         
+
 
 (defun wnnrpc-hindo-file-create-client (env fi dic-id freqname comment passwd)
   (if (and (null (file-exists-p freqname))
@@ -1759,7 +1759,7 @@ HINSHI and FUZOKUGO are information of preceding bunsetsu."
   (cond
    ((null filename) "")
    ((null (file-readable-p filename)) (- (wnn-const WNN_FILE_READ_ERROR)))
-   (t 
+   (t
     (wnnrpc-with-temp-buffer
       (insert-file-contents filename nil 0 (1- (wnn-const WNN_PASSWD_LEN)))
       (goto-char 1)
@@ -1768,4 +1768,4 @@ HINSHI and FUZOKUGO are information of preceding bunsetsu."
          (backward-char))
       (buffer-substring 1 (point))))))
 
-;;; egg/wnnrpc.el ends here.
+;;; egg/wnnrpc.el ends here
diff --git a/eggrc b/eggrc
index bcde322..50f6226 100644 (file)
--- a/eggrc
+++ b/eggrc
   (wnn-add-dict '("ud") "" 15 t t)
   (wnn-set-param  2 10 2 45 1 80 5 1 50 -20 400 -10  100  -100 200 0 200))
 
+(defun wnn7-jserver-setup ()
+  (wnn-define-environment nil)
+  (wnn-set-fuzokugo "system/kougo.fzk")
+  (wnn-add-fisys-dict "system/fisd" '("fisd.h") t)
+  (wnn-add-fiusr-dict '("fiud") nil t nil)
+
+  (wnn-add-dict "system/kihon.dic"        '("kihon.h")       6 nil t)
+  (wnn-add-dict "system/symbol.dic"       '("symbol.h")      1 nil t)
+  (wnn-add-dict "system/symbol_noat.dic"  '("symbol_noat.h") 1 nil t)
+  (wnn-add-dict "system/tel.dic"          '("tel.h")         1 nil t)
+  (wnn-add-dict "system/zip.dic"          '("zip.h")         1 nil t)
+  (wnn-add-dict "system/tankan.dic"       nil                1 nil nil)
+  (wnn-add-dict "system/tankan2.dic"      nil                1 nil nil)
+  (wnn-add-dict "system/ikeiji.dic"       nil                1 nil nil)
+  (wnn-add-dict "system/rensou.dic"       nil                1 nil nil)
+  (wnn-add-dict '("ud")                   nil               15 t   t)
+
+  (wnn-add-dict "option/jinmei.dic"       '("jinmei.h")      1 nil t)
+  (wnn-add-dict "option/chimei.dic"       '("chimei.h")      1 nil t)
+  (wnn-add-dict "option/address.dic"      '("address.h")     1 nil t)
+  (wnn-add-dict "option/station.dic"      '("station.h")     1 nil t)
+  (wnn-add-dict "option/kana_english.dic" '("kana_english.h")1 nil t)
+  (wnn-add-dict "option/enterprise.dic"   '("enterprise.h")  1 nil t)
+  (wnn-add-dict "option/airport.dic"      '("airport.h")     1 nil t)
+  (wnn-add-dict "option/university.dic"   '("university.h")  1 nil t)
+  (wnn-add-dict "option/zoo.dic"          '("zoo.h")         1 nil t)
+  (wnn-add-dict "option/botanical_garden.dic" '("botanical_garden.h") 1 nil t)
+  (wnn-add-dict "option/aquarium.dic"     '("aquarium.h")    1 nil t)
+  (wnn-add-dict "option/conveni.dic"      '("conveni.h")     1 nil t)
+  (wnn-add-dict "option/amusement.dic"    '("amusement.h")   1 nil t)
+
+  (wnn-set-param  5 10 2 45 0  80 5 1 20  0 400 -100 400   80 200 2 200)
+
+  (wnn-add-notrans-dict '("katakana") 15 t)
+  (wnn-add-bmodify-dict '("bunsetsu") 15 t)
+
+  (wnn-set-last-is-first-mode t)
+  (wnn-set-complex-conv-mode nil)
+  ;; (wnn-set-okuri-flag -1)
+  (wnn-set-prefix-flag 0)
+
+  (wnn-set-okuri-learn-mode t)
+  (wnn-set-prefix-learn-mode t)
+  (wnn-set-suffix-learn-mode t)
+  (wnn-set-common-learn-mode t)
+  (wnn-set-yuragi-mode nil)
+
+  (wnn-set-freq-func-mode 4)
+
+;;  (wnn-set-yosoku-learn t)
+;;  (wnn-set-yosoku-max-disp 10)
+;;  (wnn-set-yosoku-last-is-first t)
+
+;;  (wnn-set-boin-kabusoku t)
+;;  (wnn-set-shiin-choka t)
+;;  (wnn-set-n-choka t)
+;;  (wnn-set-nihongo-kosei t)
+
+  ;; (wnn-set-numeric-mode -12)
+  ;; (wnn-set-alphabet-mode -30)
+  ;; (wnn-set-symbol-mode -40)
+
+  (wnn-define-environment t)
+  (wnn-set-fuzokugo "system/kougo.fzk")
+  (wnn-add-dict "system/kihonR.dic" nil 1 nil nil)
+  (wnn-add-dict "system/telR.dic" nil 1 nil nil)
+  (wnn-add-dict "system/zipR.dic" nil 1 nil nil)
+  (wnn-add-dict "system/tankanR.dic" nil 1 nil nil)
+  (wnn-add-dict "system/tankan2R.dic" nil 1 nil nil)
+
+  (wnn-add-dict "option/jinmeiR.dic" nil 1 nil nil)
+  (wnn-add-dict "option/chimeiR.dic" nil 1 nil nil)
+  (wnn-add-dict "option/addressR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/stationR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/kana_englishR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/enterpriseR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/airportR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/universityR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/zooR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/botanical_gardenR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/aquariumR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/conveniR.dic" nil 1 nil nil)
+  ;;(wnn-add-dict "option/amusementR.dic" nil 1 nil nil)
+
+  (wnn-add-dict '("ud") nil 15 t t)
+  (wnn-set-param  2 10 2 45 1 80 5 1 50 -20 400 -10  100  -100 200 0 200))
+
 (cond
  ((eq egg-backend-type 'wnn)
   (cond
index e436faf..fd29399 100644 (file)
@@ -43,6 +43,7 @@
 
 (defvar its-select-alist nil)
 (make-variable-buffer-local 'its-select-func-alist)
+(setq-default its-select-func-alist nil)
 (put 'its-select-alist 'permanent-local t)
 
 (defvar its-select-func-default-alist nil)
diff --git a/its.el b/its.el
index def657d..2596049 100644 (file)
--- a/its.el
+++ b/its.el
@@ -101,7 +101,7 @@ This variable override `its-delete-by-keystroke'."
 (make-variable-buffer-local 'its-previous-select-func)
 (put 'its-previous-select-func 'permanent-local t)
 
-(defvar its-current-language)
+(defvar its-current-language nil)
 (make-variable-buffer-local 'its-current-language)
 (put 'its-current-language 'permanent-local t)
 \f
@@ -247,7 +247,7 @@ This variable override `its-delete-by-keystroke'."
   (if (consp (cdr syl))
       (cons (its-get-output syl) (its-get-keyseq-syl syl))
     syl))
-    
+
 ;;
 ;;
 
@@ -275,8 +275,8 @@ This variable override `its-delete-by-keystroke'."
     (define-key map "\M-y" 'its-yank-pop)
     (define-key map [backspace] 'its-delete-backward-SYL)
     (define-key map [delete] 'its-delete-backward-SYL)
-    (define-key map [M-backspace] 'its-delete-backward-SYL-by-keystroke)
-    (define-key map [M-delete] 'its-delete-backward-SYL-by-keystroke)
+    (define-key map [(meta backspace)] 'its-delete-backward-SYL-by-keystroke)
+    (define-key map [(meta delete)] 'its-delete-backward-SYL-by-keystroke)
     (define-key map [right] 'its-forward-SYL)
     (define-key map [left] 'its-backward-SYL)
     (while (< i 127)
@@ -834,7 +834,7 @@ Return last state."
        (setq state next-state))
        ((null build-if-none)
        (error "No such state (%s)" input))
-       (t 
+       (t
        (if (not (or brand-new (= i 1) (its-get-kst/t state)))
            (its-set-interim-terminal-state state))
        (setq state (its-make-next-state state key
@@ -1082,7 +1082,7 @@ Return last state."
        (signal 'beginning-of-buffer nil))
     (delete-region p (point))
     (if (> len n)
-       (its-state-machine-keyseq (substring keyseq 0 (- len n)) 
+       (its-state-machine-keyseq (substring keyseq 0 (- len n))
                                  'its-buffer-ins/del-SYL)
       (its-set-cursor-status
        (if (or (null its-delete-by-keystroke)
@@ -1556,5 +1556,31 @@ Return last state."
     (princ (documentation 'its-mode))
     (help-setup-xref (cons #'help-xref-mode (current-buffer)) (interactive-p))))
 
+;; The `point-left' hook function will never be called in Emacs 21.2.50
+;; when the command `next-line' is used in the last line of a buffer
+;; which isn't terminated with a newline or the command `previous-line'
+;; is used in the first line of a buffer.
+(defun its-next-line (&optional arg)
+  "Go to the end of the line if the line isn't terminated with a newline,
+otherwise run `next-line' as usual."
+  (interactive "p")
+  (if (= (line-end-position) (point-max))
+      (end-of-line)
+    (next-line arg)))
+
+(defun its-previous-line (&optional arg)
+  "Go to the beginning of the line if it is called in the first line of a
+buffer, otherwise run `previous-line' as usual."
+  (interactive "p")
+  (if (= (line-beginning-position) (point-mim))
+      (beginning-of-line)
+    (previous-line arg)))
+
+(substitute-key-definition 'next-line 'its-next-line
+                          its-mode-map global-map)
+(substitute-key-definition 'previous-line 'its-previous-line
+                          its-mode-map global-map)
+
 (provide 'its)
-;;; its.el ends here.
+
+;;; its.el ends here
index bd39186..849d74b 100644 (file)
@@ -148,10 +148,10 @@ INPUT + I-TAIL + OTHERWISE  (see `its-defrule-otherwise')."
     (its-defrule (concat "x" (car small)) (cadr small)))
 
   (its-define-aynu
-   (""   nil           "\e$(O%"\e(B"   "\e$(O%$\e(B"   "\e$(O%&\e(B"   "\e$(O%(\e(B"   "\e$(O%*\e(B")
-   ("k"  "\e$(O&n\e(B"   "\e$(O%+\e(B"   "\e$(O%-\e(B"   "\e$(O%/\e(B"   "\e$(O%1\e(B"   "\e$(O%3\e(B")
+   (""   nil   "\e$(O%"\e(B"   "\e$(O%$\e(B"   "\e$(O%&\e(B"   "\e$(O%(\e(B"   "\e$(O%*\e(B")
+   ("k"  "\e$(O&n\e(B"           "\e$(O%+\e(B"   "\e$(O%-\e(B"   "\e$(O%/\e(B"   "\e$(O%1\e(B"   "\e$(O%3\e(B")
    ("g"  "\e$(O%0\e(B"   "\e$(O%,\e(B"   "\e$(O%.\e(B"   "\e$(O%0\e(B"   "\e$(O%2\e(B"   "\e$(O%4\e(B")
-   ("s"  "\e$(O&p\e(B"   "\e$(O%5\e(B"   "\e$(O%7\e(B"   "\e$(O%9\e(B"   "\e$(O%;\e(B"   "\e$(O%=\e(B")
+   ("s"  "\e$(O&p\e(B"           "\e$(O%5\e(B"   "\e$(O%7\e(B"   "\e$(O%9\e(B"   "\e$(O%;\e(B"   "\e$(O%=\e(B")
    ("z"  nil    "\e$(O%6\e(B"   "\e$(O%8\e(B"   "\e$(O%:\e(B"   "\e$(O%<\e(B"   "\e$(O%>\e(B")
    ("vs" nil    nil    nil    nil    "\e$(O%|\e(B"   nil)
    ("sh" "\e$(O%7%c\e(B" "\e$(O%7%c\e(B" "\e$(O%7\e(B"   "\e$(O%7%e\e(B" "\e$(O%7%'\e(B" "\e$(O%7%g\e(B")
@@ -281,4 +281,5 @@ INPUT + I-TAIL + OTHERWISE  (see `its-defrule-otherwise')."
       (its-defrule   "?"   "?")  (its-defrule   "/"   "/"))))
 
 (provide 'its/aynu)
-;;; its/aynu.el ends here.
+
+;;; its/aynu.el ends here
index e4296c3..dae55b2 100644 (file)
 
   (dolist (ascii '(("0" . "\e$A#0\e(B")  ("1" . "\e$A#1\e(B")  ("2" . "\e$A#2\e(B")  ("3" . "\e$A#3\e(B")
                   ("4" . "\e$A#4\e(B")  ("5" . "\e$A#5\e(B")  ("6" . "\e$A#6\e(B")  ("7" . "\e$A#7\e(B")
-                  ("8" . "\e$A#8\e(B")  ("9" . "\e$A#9\e(B") 
+                  ("8" . "\e$A#8\e(B")  ("9" . "\e$A#9\e(B")
                   (" " . "\e$A!!\e(B")  ("!" . "\e$A#!\e(B")  ("@" . "\e$A#@\e(B")  ("#" . "\e$A##\e(B")
                   ("$" . "\e$A!g\e(B")  ("%" . "\e$A#%\e(B")  ("^" . "\e$A#^\e(B")  ("&" . "\e$A#&\e(B")
                   ("*" . "\e$A#*\e(B")  ("(" . "\e$A#(\e(B")  (")" . "\e$A#)\e(B")
 
   (dolist (ascii '(("0" . "\e$(G$!\e(B")  ("1" . "\e$(G$"\e(B")  ("2" . "\e$(G$#\e(B")  ("3" . "\e$(G$$\e(B")
                   ("4" . "\e$(G$%\e(B")  ("5" . "\e$(G$&\e(B")  ("6" . "\e$(G$'\e(B")  ("7" . "\e$(G$(\e(B")
-                  ("8" . "\e$(G$)\e(B")  ("9" . "\e$(G$*\e(B") 
+                  ("8" . "\e$(G$)\e(B")  ("9" . "\e$(G$*\e(B")
                   (" " . "\e$(G!!\e(B")  ("!" . "\e$(G!*\e(B")  ("@" . "\e$(G"i\e(B")  ("#" . "\e$(G!l\e(B")
                   ("$" . "\e$(G"c\e(B")  ("%" . "\e$(G"h\e(B")  ("^" . "\e$(G!T\e(B")  ("&" . "\e$(G!m\e(B")
                   ("*" . "\e$(G!n\e(B")  ("(" . "\e$(G!>\e(B")  (")" . "\e$(G!?\e(B")