• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A multilingual input method framework


Commit MetaInfo

Revisiondd732e15e590c13f1755e1028ea566cba72634ef (tree)
Time2005-09-05 05:35:59
Authoryamaken <yamaken@ff9a...>
Commiteryamaken

Log Message

* doc/COMPATIBILITY
* test/test-util.scm
* scm/custom.scm
* scm/util.scm
* scm/im-custom.scm
* scm/hangul.scm
* scm/key.scm
* scm/custom-rt.scm

- Port r1413 from trunk

Change Summary

Incremental Difference

--- a/doc/COMPATIBILITY
+++ b/doc/COMPATIBILITY
@@ -58,6 +58,38 @@ Each change consist of following fields. All fields are required.
5858 The changes are described below in most recently updated order.
5959
6060 ------------------------------------------------------------------------------
61+Summary: Obsolete some misc Scheme APIs
62+Affects: IM developers
63+Updates: Scheme API
64+Version: 0.5, 0.4.9
65+Revision: ac1413
66+Date: 2005-09-05
67+Modifier: YamaKen
68+Related:
69+URL:
70+Changes:
71+ (removed) bitwise-or
72+ (new) bitwise-ior
73+ (removed) enclose-another-env
74+ (new) %%enclose-another-env
75+ (removed) toplevel-env
76+ (new) interaction-environment
77+Description:
78+ Obsolete inappropriate or wrong API with new appropriate ones.
79+------------------------------------------------------------------------------
80+Summary: An experimental custom variable reloading API
81+Affects: Helper program developers, Bridge developers
82+Updates: C API, Helper protocol
83+Version: 0.5
84+Revision: ac1160, ac1161, ac1162
85+Date: 2005-08-09
86+Modifier: TOKUNAGA Hiroyuki, YamaKen
87+Related: bug #3620
88+URL:
89+Changes:
90+ (new) uim_custom_broadcast_reload_request()
91+Description:
92+------------------------------------------------------------------------------
6193 Summary: default IM switching responsibility separation from uim_switch_im()
6294 Affects: Bridge developers
6395 Updates: C API
--- a/scm/custom-rt.scm
+++ b/scm/custom-rt.scm
@@ -156,7 +156,7 @@
156156 (let ((key-val (custom-modify-key-predicate-names val)))
157157 (eval (list 'define (symbolconc sym '?)
158158 (list 'make-key-predicate (list 'quote key-val)))
159- toplevel-env))
159+ (interaction-environment)))
160160 #t)
161161 ((custom-exist? sym #f)
162162 (set-symbol-value! sym val)
@@ -179,7 +179,7 @@
179179 (list 'quote default)
180180 default)))
181181 (eval (list 'define sym quoted-default)
182- toplevel-env)
182+ (interaction-environment))
183183 (if (custom-key-exist? sym)
184184 ;; already define-key'ed in ~/.uim
185185 (custom-call-hook-procs sym custom-set-hooks)
@@ -187,7 +187,7 @@
187187 (if (eq? (car type)
188188 'key)
189189 (eval (list 'define (symbolconc sym '?) list)
190- toplevel-env))
190+ (interaction-environment)))
191191 (custom-set-value! sym default)))))))) ;; to apply hooks
192192
193193 ;; lightweight implementation
--- a/scm/custom.scm
+++ b/scm/custom.scm
@@ -518,7 +518,7 @@
518518 (list 'quote default)
519519 default)))
520520 (eval (list 'define sym quoted-default)
521- toplevel-env)
521+ (interaction-environment))
522522 (custom-set-value! sym default))) ;; to apply hooks
523523 (for-each (lambda (subgrp)
524524 (let ((registered (custom-group-subgroups primary-grp)))
@@ -571,7 +571,7 @@
571571 (let ((key-val (custom-modify-key-predicate-names val)))
572572 (eval (list 'define (symbolconc sym '?)
573573 (list 'make-key-predicate (list 'quote key-val)))
574- toplevel-env)))
574+ (interaction-environment))))
575575 (custom-call-hook-procs sym custom-set-hooks)
576576 (custom-call-hook-procs sym custom-update-hooks)
577577 (let ((post-activities (map-activities)))
--- a/scm/hangul.scm
+++ b/scm/hangul.scm
@@ -40,8 +40,8 @@
4040 (generic-commit-key?
4141 (make-key-predicate '(" " generic-return-key?)))
4242 (generic-proc-input-state-with-preedit-with-this-env
43- (enclose-another-env generic-proc-input-state-with-preedit
44- (the-environment))))
43+ (%%enclose-another-env generic-proc-input-state-with-preedit
44+ (the-environment))))
4545 (lambda (gc key state rkc) ;; "gc" stands for "generic-context"
4646 (generic-proc-input-state-with-preedit-with-this-env gc key state rkc))))
4747
@@ -54,7 +54,7 @@
5454 (generic-proc-input-state-with-preedit
5555 hangul-proc-on-mode-with-preedit)
5656 (generic-proc-input-state-with-this-env
57- (enclose-another-env generic-proc-input-state (the-environment))))
57+ (%%enclose-another-env generic-proc-input-state (the-environment))))
5858 (lambda (gc key state) ;; "gc" stands for "generic-context"
5959 (generic-proc-input-state-with-this-env gc key state))))
6060
@@ -62,7 +62,7 @@
6262 (define hangul-key-press-handler
6363 (let* ((generic-proc-input-state hangul-proc-on-mode)
6464 (generic-key-press-handler-with-this-env
65- (enclose-another-env generic-key-press-handler (the-environment))))
65+ (%%enclose-another-env generic-key-press-handler (the-environment))))
6666 (lambda (gc key state)
6767 (generic-key-press-handler-with-this-env gc key state))))
6868
--- a/scm/im-custom.scm
+++ b/scm/im-custom.scm
@@ -197,9 +197,9 @@
197197 loaded-sym)
198198 ((try-load file)
199199 (eval (list 'define loaded-sym #t)
200- toplevel-env)
200+ (interaction-environment))
201201 (eval (list 'define reloaded-sym #t)
202- toplevel-env)
202+ (interaction-environment))
203203 loaded-sym)
204204 (else
205205 #f)))))
--- a/scm/key.scm
+++ b/scm/key.scm
@@ -307,7 +307,7 @@
307307 (let* ((modified-key-strs (modify-key-strs-implicitly key-strs))
308308 (predicate (make-key-predicate modified-key-strs)))
309309 (eval (list 'define key-predicate-sym predicate)
310- toplevel-env))))
310+ (interaction-environment)))))
311311
312312 (define valid-key-str?
313313 (lambda (key-str)
--- a/scm/util.scm
+++ b/scm/util.scm
@@ -192,6 +192,11 @@
192192 ;; definition of 'else' has been moved into slib.c
193193 ;(define else #t)
194194
195+;; for eval
196+(define interaction-environment
197+ (lambda ()
198+ ()))
199+
195200 (define boolean?
196201 (lambda (x)
197202 (or (eq? x #t)
@@ -555,7 +560,7 @@
555560 (lambda xs
556561 (fold bit-and (bitwise-not 0) xs)))
557562
558-(define bitwise-or
563+(define bitwise-ior
559564 (lambda xs
560565 (fold bit-or 0 xs)))
561566
@@ -593,11 +598,8 @@
593598 (eq? (symbolconc '* (string->symbol file) '-loaded*)
594599 (*catch 'errobj (require file))))))
595600
596-;; for eval
597-(define toplevel-env ())
598-
599601 ;; used for dynamic environment substitution of closure
600-(define enclose-another-env
602+(define %%enclose-another-env
601603 (lambda (closure another-env)
602604 (let* ((code (%%closure-code closure))
603605 (args (car code))
@@ -621,9 +623,9 @@
621623 (set-car! (nthcdr index rec)
622624 val))))
623625 (eval (list 'define getter-sym getter)
624- toplevel-env)
626+ (interaction-environment))
625627 (eval (list 'define setter-sym setter)
626- toplevel-env)))
628+ (interaction-environment))))
627629 rec-spec
628630 (iota (length rec-spec)))
629631 (let ((creator-sym (symbolconc rec-sym '-new))
@@ -647,7 +649,7 @@
647649 (else
648650 #f))))))
649651 (eval (list 'define creator-sym creator)
650- toplevel-env))))
652+ (interaction-environment)))))
651653
652654 ;; for direct candidate selection
653655 (define number->candidate-index
--- a/test/test-util.scm
+++ b/test/test-util.scm
@@ -29,7 +29,7 @@
2929 ;;; SUCH DAMAGE.
3030 ;;;;
3131
32-;; This file is tested with revision 952 (new repository)
32+;; This file is tested with revision 1413 (new repository)
3333
3434 (use test.unit)
3535
@@ -1315,10 +1315,17 @@
13151315 (uim '(alist-delete 'three alist-sym eq?)))))
13161316
13171317 (define-uim-test-case "test util Siod specific procedures"
1318- ("test toplevel-env"
1319- (assert-true (uim-bool '(eval '(symbol-bound? 'filter-map)
1320- toplevel-env))))
1321- ("test enclose-another-env"
1318+ ("test interaction-environment"
1319+ (assert-true (uim-bool '(eval '(symbol-bound? 'filter-map)
1320+ (interaction-environment))))
1321+ (assert-false (uim-bool '(eval '(symbol-bound? 'filter-baz)
1322+ (interaction-environment))))
1323+ (uim '(eval (list define 'filter-baz filter-map)
1324+ (interaction-environment)))
1325+ (assert-true (uim-bool '(eval '(symbol-bound? 'filter-baz)
1326+ (interaction-environment))))
1327+ (assert-true (uim-bool '(eq? filter-baz filter-map))))
1328+ ("test %%enclose-another-env"
13221329 (assert-equal 3
13231330 (uim '(let* ((x 1)
13241331 (y 2)
@@ -1333,7 +1340,7 @@
13331340 (another-env '((x . 4)
13341341 (y . 6))))
13351342 (set! closure
1336- (enclose-another-env closure another-env))
1343+ (%%enclose-another-env closure another-env))
13371344 (closure))))
13381345 ;; causes error since z is not exist in the another-env
13391346 (assert-error (lambda ()
@@ -1345,7 +1352,7 @@
13451352 (another-env '((x . 4)
13461353 (y . 6))))
13471354 (set! closure
1348- (enclose-another-env closure another-env))
1355+ (%%enclose-another-env closure another-env))
13491356 (closure)))))))
13501357
13511358 (define-uim-test-case "test util define-record"