From: kate Date: Mon, 22 Jul 2002 13:18:56 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9fd651340223348e2a285a454f7ac11d2b7df23;p=elisp%2Ftamago.git *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 06ee86b..c7a352e 100644 --- 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 (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 + + * egg-x0213.el: New file. + +2001-11-10 Kinji Itoh + (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 (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 + (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 (cf. [tamago:00516]) + + * its/greek.el: New file. + +2001-07-24 KATAYAMA Yoshio (cf. [tamago:00504]) + + * eggrc (wnn7-jserver-setup): New function. + +2001-06-28 Yoshiki Hayashi (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 (cf. [tamago:00462]) + + * its/aynu.el: Require `cl' when compiling. + +2001-05-23 Katsumi Yamaoka (cf. [tamago:00461]) + + * egg.el: Require `cl' only when compiling. + * its.el: Ditto. + 2001-05-22 KATAYAMA Yoshio * 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 @@ -115,7 +190,7 @@ 2000-02-01 Takanori Saneto * egg/sj3rpc.el (sj3rpc-tanbunsetsu-conversion): should use - let* instead of let. + let* instead of let. 2000-01-20 Katsumi Yamaoka @@ -151,12 +226,12 @@ 2000-01-17 TOMURA Satoru - * Version 4.0.6 released - + * Version 4.0.6 released. + 2000-01-17 TOMURA Satoru * README.ja.text: mentiond about doc/lc99.text - + 2000-01-17 KATAYAMA Yoshio * its.el (its-hiragana, its-katanaka): modified @@ -170,43 +245,44 @@ (its-japanese-hankaku): added. (its-convert): added. * egg.el (egg-redraw-face): bug fixed. - + 2000-01-17 SAKAI Kiyotaka - + * its.el (its-hiragana, its-katakana): re-added. - + 2000-01-17 SANETO Takanori * 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 - + * 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 * 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 - + * Version 4.0.5 released. 2000-01-13 Katsumi Yamaoka - + * egg/sj3.el (sj3-end-conversion): Restrain from overrunning. - + 2000-01-13 Katsumi Yamaoka + * egg/sj3rpc.el (sj3rpc-open): Use `sj3-server-version' instead of 2. (sj3rpc-unpack-mb-string): New macro. @@ -230,36 +306,36 @@ * its.el: typo * egg.el: typo - + 2000-01-13 KATAYAMA Yoshio * its.el(its-hiragana, its-katakana): does not work. so deleted. - -2000-01-12 NAKAJI Hiroyuki + +2000-01-12 NAKAJI Hiroyuki * README.ja.txt: typo * Makefile.in: (clean, distclean): modified. 2000-01-12 TOMURA Satoru - + * Version 4.0.4 released. - + 2000-01-12 TOMURA Satoru * REAMDE: removed. - + * README.ja.txt: created. - + 2000-01-12 SAKAI Kiyotaka * Makefile.in: "clean" removes ${ELCS}. - + * Makefile.in: "distclean" created. - + 2000-01-12 Satoru Tomura * Version 4.0.3 released. - + 2000-01-12 Satoru Tomura * install-sh: copied from automake distribution @@ -269,7 +345,7 @@ * Makefile.in: created * configure: generated by autoconf - + 2000-01-11 Satoru Tomura * leim-list.el: (defgroup sj3) added. @@ -278,30 +354,28 @@ 2000-01-11 Katsumi Yamaoka - * egg/sj3.el : (require 'egg) added. + * egg/sj3.el: (require 'egg) added. 2000-01-11 SAKAI Kiyotaka - + * its.el (its-hiragana, its-katakana): New functions - + 2000-01-07 Tomura Satoru - + * COPYING: The file is added. - + * ChangeLog.1: The original ChangeLog is renamed as. - + * ChangeLog: Created. - + 2000-01-07 Tomura Satoru - + * Version 4.0.2 released. - + 2000-01-06 Tomura Satoru - + * Version 4.0.1 released. - + 2000-01-05 Tomura Satoru - - * Version 4.0.0 released. - + * Version 4.0.0 released. diff --git a/egg-cnv.el b/egg-cnv.el index 5ad9577..e6aa097 100644 --- a/egg-cnv.el +++ b/egg-cnv.el @@ -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 --- 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) @@ -345,7 +348,7 @@ (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) diff --git a/egg/canna.el b/egg/canna.el index 205ff17..acb5d4a 100644 --- a/egg/canna.el +++ b/egg/canna.el @@ -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 diff --git a/egg/sj3.el b/egg/sj3.el index 61d7249..e5e5264 100644 --- a/egg/sj3.el +++ b/egg/sj3.el @@ -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) diff --git a/egg/wnn.el b/egg/wnn.el index 6985278..0f2a5ea 100644 --- a/egg/wnn.el +++ b/egg/wnn.el @@ -390,13 +390,12 @@ by ':' and digit N." ;; ::= [ ;; -;; -;; -;; -;; ] +;; +;; +;; +;; ] ;; ;; ::= [ ] -;; (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)))))))) diff --git a/egg/wnnrpc.el b/egg/wnnrpc.el index 8fcc98d..5de060b 100644 --- a/egg/wnnrpc.el +++ b/egg/wnnrpc.el @@ -162,8 +162,8 @@ ((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) @@ -725,7 +725,7 @@ (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." (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 --- a/eggrc +++ b/eggrc @@ -107,6 +107,93 @@ (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 diff --git a/its-keydef.el b/its-keydef.el index e436faf..fd29399 100644 --- a/its-keydef.el +++ b/its-keydef.el @@ -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 --- 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) @@ -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 diff --git a/its/aynu.el b/its/aynu.el index bd39186..849d74b 100644 --- a/its/aynu.el +++ b/its/aynu.el @@ -148,10 +148,10 @@ INPUT + I-TAIL + OTHERWISE (see `its-defrule-otherwise')." (its-defrule (concat "x" (car small)) (cadr small))) (its-define-aynu - ("" nil "$(O%"(B" "$(O%$(B" "$(O%&(B" "$(O%((B" "$(O%*(B") - ("k" "$(O&n(B" "$(O%+(B" "$(O%-(B" "$(O%/(B" "$(O%1(B" "$(O%3(B") + ("" nil "$(O%"(B" "$(O%$(B" "$(O%&(B" "$(O%((B" "$(O%*(B") + ("k" "$(O&n(B" "$(O%+(B" "$(O%-(B" "$(O%/(B" "$(O%1(B" "$(O%3(B") ("g" "$(O%0(B" "$(O%,(B" "$(O%.(B" "$(O%0(B" "$(O%2(B" "$(O%4(B") - ("s" "$(O&p(B" "$(O%5(B" "$(O%7(B" "$(O%9(B" "$(O%;(B" "$(O%=(B") + ("s" "$(O&p(B" "$(O%5(B" "$(O%7(B" "$(O%9(B" "$(O%;(B" "$(O%=(B") ("z" nil "$(O%6(B" "$(O%8(B" "$(O%:(B" "$(O%<(B" "$(O%>(B") ("vs" nil nil nil nil "$(O%|(B" nil) ("sh" "$(O%7%c(B" "$(O%7%c(B" "$(O%7(B" "$(O%7%e(B" "$(O%7%'(B" "$(O%7%g(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 diff --git a/its/pinyin.el b/its/pinyin.el index e4296c3..dae55b2 100644 --- a/its/pinyin.el +++ b/its/pinyin.el @@ -237,7 +237,7 @@ (dolist (ascii '(("0" . "$A#0(B") ("1" . "$A#1(B") ("2" . "$A#2(B") ("3" . "$A#3(B") ("4" . "$A#4(B") ("5" . "$A#5(B") ("6" . "$A#6(B") ("7" . "$A#7(B") - ("8" . "$A#8(B") ("9" . "$A#9(B") + ("8" . "$A#8(B") ("9" . "$A#9(B") (" " . "$A!!(B") ("!" . "$A#!(B") ("@" . "$A#@(B") ("#" . "$A##(B") ("$" . "$A!g(B") ("%" . "$A#%(B") ("^" . "$A#^(B") ("&" . "$A#&(B") ("*" . "$A#*(B") ("(" . "$A#((B") (")" . "$A#)(B") @@ -311,7 +311,7 @@ (dolist (ascii '(("0" . "$(G$!(B") ("1" . "$(G$"(B") ("2" . "$(G$#(B") ("3" . "$(G$$(B") ("4" . "$(G$%(B") ("5" . "$(G$&(B") ("6" . "$(G$'(B") ("7" . "$(G$((B") - ("8" . "$(G$)(B") ("9" . "$(G$*(B") + ("8" . "$(G$)(B") ("9" . "$(G$*(B") (" " . "$(G!!(B") ("!" . "$(G!*(B") ("@" . "$(G"i(B") ("#" . "$(G!l(B") ("$" . "$(G"c(B") ("%" . "$(G"h(B") ("^" . "$(G!T(B") ("&" . "$(G!m(B") ("*" . "$(G!n(B") ("(" . "$(G!>(B") (")" . "$(G!?(B")