[uim-commit] r1293 - in branches/r5rs: scm sigscheme
ekato at freedesktop.org
ekato at freedesktop.org
Tue Aug 23 06:53:21 PDT 2005
Author: ekato
Date: 2005-08-23 06:53:18 -0700 (Tue, 23 Aug 2005)
New Revision: 1293
Modified:
branches/r5rs/scm/skk-custom.scm
branches/r5rs/scm/skk.scm
branches/r5rs/sigscheme/eval.c
Log:
* scm/skk.scm : Merge r1287, r1290, and r1291 from trunk.
* scm/skk-custom.scm : Merge r1292 from trunk.
* sigscheme/eval.c (ScmOp_set_symbol_value) : Use
SCM_SYMBOL_SET_VCELL.
Modified: branches/r5rs/scm/skk-custom.scm
===================================================================
--- branches/r5rs/scm/skk-custom.scm 2005-08-23 13:43:31 UTC (rev 1292)
+++ branches/r5rs/scm/skk-custom.scm 2005-08-23 13:53:18 UTC (rev 1293)
@@ -139,10 +139,10 @@
(lambda ()
(if (not skk-use-manual-candwin-setting?)
(cond
- ((= skk-candidate-selection-style 'ddskk-like)
+ ((eq? skk-candidate-selection-style 'ddskk-like)
(custom-set-value! 'skk-candidate-op-count 5)
(custom-set-value! 'skk-nr-candidate-max 7))
- ((= skk-candidate-selection-style 'uim)
+ ((eq? skk-candidate-selection-style 'uim)
(custom-set-value! 'skk-candidate-op-count 2)
(custom-set-value! 'skk-nr-candidate-max 10))))))
Modified: branches/r5rs/scm/skk.scm
===================================================================
--- branches/r5rs/scm/skk.scm 2005-08-23 13:43:31 UTC (rev 1292)
+++ branches/r5rs/scm/skk.scm 2005-08-23 13:53:18 UTC (rev 1293)
@@ -132,6 +132,7 @@
(define skk-preedit-attr-pending-rk #f)
(define skk-preedit-attr-conv-body #f)
(define skk-preedit-attr-conv-okuri #f)
+(define skk-preedit-attr-conv-appendix #f)
(define skk-preedit-attr-direct-pending-rk #f)
(define skk-preedit-attr-child-beginning-mark #f)
(define skk-preedit-attr-child-end-mark #f)
@@ -208,7 +209,7 @@
"ľÀÜ(̵ÊÑ´¹)ÆþÎϥ⡼¥É"))
(lambda (sc)
(let ((dsc (skk-find-descendant-context sc)))
- (= (skk-context-state dsc)
+ (eq? (skk-context-state dsc)
'skk-state-latin)))
(lambda (sc)
(let ((dsc (skk-find-descendant-context sc)))
@@ -223,7 +224,7 @@
"Á´³Ñ±Ñ¿ôÆþÎϥ⡼¥É"))
(lambda (sc)
(let ((dsc (skk-find-descendant-context sc)))
- (= (skk-context-state dsc)
+ (eq? (skk-context-state dsc)
'skk-state-wide-latin)))
(lambda (sc)
(let ((dsc (skk-find-descendant-context sc)))
@@ -355,11 +356,10 @@
(skk-reset-candidate-window sc)
(skk-context-set-nr-candidates! sc 0)
(skk-context-set-latin-conv! sc #f)
+ (skk-context-set-child-context! sc '())
+ (skk-context-set-child-type! sc '())
(if (not (null? csc))
- (begin
- (skk-flush csc)
- (skk-context-set-child-context! sc '())
- (skk-context-set-child-type! sc '()))))))
+ (skk-flush csc)))))
(define skk-context-new
(lambda (id im)
@@ -460,7 +460,7 @@
(define skk-get-string
(lambda (sc str kana)
(let ((res (skk-do-get-string sc str kana)))
- (if (and res (> (length res) 0))
+ (if (and res (> (string-length res) 0))
res
#f))))
@@ -684,7 +684,7 @@
(lambda (sc)
(let ((res #f))
;; get residual 'n'
- (if (= (skk-context-state sc) 'skk-state-kanji)
+ (if (eq? (skk-context-state sc) 'skk-state-kanji)
(skk-append-residual-kana sc))
;;
(set! res
@@ -704,19 +704,19 @@
(if (and
(null? csc)
(or
- (= stat 'skk-state-kanji)
- (= stat 'skk-state-completion)
- (= stat 'skk-state-okuri)))
+ (eq? stat 'skk-state-kanji)
+ (eq? stat 'skk-state-completion)
+ (eq? stat 'skk-state-okuri)))
(im-pushback-preedit sc skk-preedit-attr-mode-mark "¢¦"))
(if (or
(not (null? csc))
- (= stat 'skk-state-converting))
+ (eq? stat 'skk-state-converting))
(im-pushback-preedit sc skk-preedit-attr-mode-mark "¢§"))
(if (and
(null? csc)
(or
- (= stat 'skk-state-kanji)
- (= stat 'skk-state-okuri)))
+ (eq? stat 'skk-state-kanji)
+ (eq? stat 'skk-state-okuri)))
(let ((h (skk-make-string
(skk-context-head sc)
(skk-context-kana-mode sc))))
@@ -725,7 +725,7 @@
sc skk-preedit-attr-head
h))))
(if (and
- (= stat 'skk-state-converting)
+ (eq? stat 'skk-state-converting)
(or
(null? csc)
(and
@@ -733,9 +733,9 @@
(= (skk-context-child-type sc) skk-child-type-dialog))))
(begin
(if (or
- (= skk-candidate-selection-style 'uim)
+ (eq? skk-candidate-selection-style 'uim)
(and
- (= skk-candidate-selection-style 'ddskk-like)
+ (eq? skk-candidate-selection-style 'ddskk-like)
(not (skk-context-candidate-window sc))))
(im-pushback-preedit
sc
@@ -760,11 +760,11 @@
(if (and
(not (null? csc))
(or
- (= stat 'skk-state-kanji)
- (= stat 'skk-state-okuri)
+ (eq? stat 'skk-state-kanji)
+ (eq? stat 'skk-state-okuri)
(and
- (= stat 'skk-state-converting)
- (= (skk-context-child-type sc) skk-child-type-editor))))
+ (eq? stat 'skk-state-converting)
+ (eq? (skk-context-child-type sc) skk-child-type-editor))))
(let ((h '()))
(if skk-use-numeric-conversion?
;; replace numeric string with #
@@ -780,7 +780,7 @@
sc skk-preedit-attr-head
h))))
(if (and
- (= stat 'skk-state-completion)
+ (eq? stat 'skk-state-completion)
(null? csc))
(begin
(im-pushback-preedit
@@ -788,10 +788,10 @@
(skk-get-current-completion sc))))
(if (or
- (= stat 'skk-state-okuri)
+ (eq? stat 'skk-state-okuri)
(and
(not (null? csc))
- (= stat 'skk-state-converting)
+ (eq? stat 'skk-state-converting)
(skk-context-okuri sc)
(= (skk-context-child-type sc) skk-child-type-editor)))
(begin
@@ -802,9 +802,9 @@
(skk-context-kana-mode sc))))))
(if (or
- (= stat 'skk-state-direct)
- (= stat 'skk-state-latin)
- (= stat 'skk-state-wide-latin))
+ (eq? stat 'skk-state-direct)
+ (eq? stat 'skk-state-latin)
+ (eq? stat 'skk-state-wide-latin))
(begin
(im-pushback-preedit sc skk-preedit-attr-direct-pending-rk
(rk-pending rkc))
@@ -814,9 +814,9 @@
(rk-pending rkc))
(if (and
(or
- (= stat 'skk-state-kanji)
- (= stat 'skk-state-completion)
- (= stat 'skk-state-okuri))
+ (eq? stat 'skk-state-kanji)
+ (eq? stat 'skk-state-completion)
+ (eq? stat 'skk-state-okuri))
skk-show-cursor-on-preedit?)
(im-pushback-preedit sc preedit-cursor ""))))
@@ -1109,18 +1109,19 @@
key-str))
#t));;and
;; update state
- (if (= (skk-context-state sc) 'skk-state-kanji)
+ (if (eq? (skk-context-state sc) 'skk-state-kanji)
(if res
(skk-append-string sc res)))
(if (or
- (= (skk-context-state sc) 'skk-state-direct)
- (= (skk-context-state sc) 'skk-state-latin)
- (= (skk-context-state sc) 'skk-state-wide-latin))
+ (eq? (skk-context-state sc) 'skk-state-direct)
+ (eq? (skk-context-state sc) 'skk-state-latin)
+ (eq? (skk-context-state sc) 'skk-state-wide-latin))
(if (and res
(or
(list? (car res))
(not (string=? (car res) ""))))
- (skk-get-string sc res kana))
+ (skk-get-string sc res kana)
+ #f)
#f))))
(define skk-sokuon-shiin-char?
@@ -1301,7 +1302,7 @@
#f)
#t)
(if (and res
- (= stat 'skk-state-kanji)
+ (eq? stat 'skk-state-kanji)
(or
(list? (car res))
(not (string=? (car res) ""))))
@@ -1310,7 +1311,7 @@
#t)
#t)
(if (and res
- (= stat 'skk-state-okuri)
+ (eq? stat 'skk-state-okuri)
(or
(list? (car res))
(not (string=? (car res) ""))))
@@ -1357,9 +1358,9 @@
(im-activate-candidate-selector
sc
(cond
- ((= skk-candidate-selection-style 'uim)
+ ((eq? skk-candidate-selection-style 'uim)
(skk-context-nr-candidates sc))
- ((= skk-candidate-selection-style 'ddskk-like)
+ ((eq? skk-candidate-selection-style 'ddskk-like)
(- (skk-context-nr-candidates sc)
(- skk-candidate-op-count 1))))
skk-nr-candidate-max))
@@ -1374,9 +1375,9 @@
(im-activate-candidate-selector
sc
(cond
- ((= skk-candidate-selection-style 'uim)
+ ((eq? skk-candidate-selection-style 'uim)
(skk-context-nr-candidates sc))
- ((= skk-candidate-selection-style 'ddskk-like)
+ ((eq? skk-candidate-selection-style 'ddskk-like)
(- (skk-context-nr-candidates sc)
(- skk-candidate-op-count 1))))
skk-nr-candidate-max))))))))
@@ -1387,17 +1388,17 @@
(cur-page (if (= skk-nr-candidate-max 0)
0
(cond
- ((= skk-candidate-selection-style 'uim)
+ ((eq? skk-candidate-selection-style 'uim)
(quotient (skk-context-nth sc)
skk-nr-candidate-max))
- ((= skk-candidate-selection-style 'ddskk-like)
+ ((eq? skk-candidate-selection-style 'ddskk-like)
(quotient (- (skk-context-nth sc)
(- skk-candidate-op-count 1))
skk-nr-candidate-max)))))
(idx -1)
(res #f))
(cond
- ((= skk-candidate-selection-style 'uim)
+ ((eq? skk-candidate-selection-style 'uim)
(let ((num (- (length skk-uim-heading-label-char-list)
(length
(member (charcode->string key)
@@ -1405,7 +1406,7 @@
(if (or (< num skk-nr-candidate-max)
(= skk-nr-candidate-max 0))
(set! idx (+ (* cur-page skk-nr-candidate-max) num)))))
- ((= skk-candidate-selection-style 'ddskk-like)
+ ((eq? skk-candidate-selection-style 'ddskk-like)
(let ((num (- (length skk-ddskk-like-heading-label-char-list)
(length
(member (charcode->string key)
@@ -1424,9 +1425,9 @@
(define skk-incr-candidate-index
(lambda (sc)
(cond
- ((= skk-candidate-selection-style 'uim)
+ ((eq? skk-candidate-selection-style 'uim)
(skk-context-set-nth! sc (+ 1 (skk-context-nth sc))))
- ((= skk-candidate-selection-style 'ddskk-like)
+ ((eq? skk-candidate-selection-style 'ddskk-like)
(if (> (+ (skk-context-nth sc) 1) (- skk-candidate-op-count 1))
(if (> (+ (skk-context-nth sc) skk-nr-candidate-max)
(- (skk-context-nr-candidates sc) 1))
@@ -1444,7 +1445,7 @@
(define skk-decr-candidate-index
(lambda (sc)
(cond
- ((= skk-candidate-selection-style 'uim)
+ ((eq? skk-candidate-selection-style 'uim)
(if (> (skk-context-nth sc) 0)
(begin
(skk-context-set-nth! sc (- (skk-context-nth sc) 1))
@@ -1459,7 +1460,7 @@
sc
(- (skk-context-nr-candidates sc) 1))
#t)))))
- ((= skk-candidate-selection-style 'ddskk-like)
+ ((eq? skk-candidate-selection-style 'ddskk-like)
(if (> (skk-context-nth sc)
(+ skk-nr-candidate-max (- skk-candidate-op-count 2)))
(begin
@@ -1501,9 +1502,9 @@
;;
(if (skk-context-candidate-window sc)
(cond
- ((= skk-candidate-selection-style 'uim)
+ ((eq? skk-candidate-selection-style 'uim)
(im-select-candidate sc (skk-context-nth sc)))
- ((= skk-candidate-selection-style 'ddskk-like)
+ ((eq? skk-candidate-selection-style 'ddskk-like)
(im-select-candidate
sc
(- (skk-context-nth sc) (- skk-candidate-op-count 1))))))
@@ -1542,9 +1543,9 @@
(skk-check-candidate-window-begin sc)
(if (skk-context-candidate-window sc)
(cond
- ((= skk-candidate-selection-style 'uim)
+ ((eq? skk-candidate-selection-style 'uim)
(im-select-candidate sc (skk-context-nth sc)))
- ((= skk-candidate-selection-style 'ddskk-like)
+ ((eq? skk-candidate-selection-style 'ddskk-like)
(im-select-candidate
sc
(- (skk-context-nth sc) (- skk-candidate-op-count 1))))))
@@ -1618,12 +1619,12 @@
(define skk-heading-label-char?
(lambda (key)
(cond
- ((= skk-candidate-selection-style 'uim)
+ ((eq? skk-candidate-selection-style 'uim)
(if (member (charcode->string key)
skk-uim-heading-label-char-list)
#t
#f))
- ((= skk-candidate-selection-style 'ddskk-like)
+ ((eq? skk-candidate-selection-style 'ddskk-like)
(if (member (charcode->string key)
skk-ddskk-like-heading-label-char-list)
#t
@@ -1686,7 +1687,7 @@
#t)
(if (skk-purge-candidate-key? key key-state)
(if (not
- (and (= skk-candidate-selection-style 'ddskk-like)
+ (and (eq? skk-candidate-selection-style 'ddskk-like)
(skk-context-candidate-window sc)))
(begin
(skk-reset-candidate-window sc)
@@ -1797,19 +1798,19 @@
(let* ((sc (skk-find-descendant-context c))
(state (skk-context-state sc))
(fun (cond
- ((= state 'skk-state-direct)
+ ((eq? state 'skk-state-direct)
skk-proc-state-direct)
- ((= state 'skk-state-kanji)
+ ((eq? state 'skk-state-kanji)
skk-proc-state-kanji)
- ((= state 'skk-state-completion)
+ ((eq? state 'skk-state-completion)
skk-proc-state-completion)
- ((= state 'skk-state-converting)
+ ((eq? state 'skk-state-converting)
skk-proc-state-converting)
- ((= state 'skk-state-okuri)
+ ((eq? state 'skk-state-okuri)
skk-proc-state-okuri)
- ((= state 'skk-state-latin)
+ ((eq? state 'skk-state-latin)
skk-proc-state-latin)
- ((= state 'skk-state-wide-latin)
+ ((eq? state 'skk-state-wide-latin)
skk-proc-state-wide-latin)))
(res (fun c key key-state)))
(if res
@@ -1836,7 +1837,7 @@
(lambda (c key state)
(let* ((sc (skk-find-descendant-context c))
(state (skk-context-state sc)))
- (if (= state 'skk-state-latin)
+ (if (eq? state 'skk-state-latin)
;; don't discard key release event for apps
(begin
(skk-context-set-commit-raw! sc #f)
@@ -1855,9 +1856,9 @@
(skk-get-nth-candidate
dcsc
(cond
- ((= skk-candidate-selection-style 'uim)
+ ((eq? skk-candidate-selection-style 'uim)
idx)
- ((= skk-candidate-selection-style 'ddskk-like)
+ ((eq? skk-candidate-selection-style 'ddskk-like)
(+ idx (- skk-candidate-op-count 1)))))))
(okuri (skk-context-okuri dcsc)))
(list
@@ -1868,7 +1869,7 @@
(skk-make-string okuri skk-type-hiragana))
cand)
(cond
- ((= skk-candidate-selection-style 'uim)
+ ((eq? skk-candidate-selection-style 'uim)
(if (= skk-nr-candidate-max 0)
(digit->string (+ idx 1))
(begin
@@ -1879,7 +1880,7 @@
(string->charcode
(nth idx skk-uim-heading-label-char-list))))
""))))
- ((= skk-candidate-selection-style 'ddskk-like)
+ ((eq? skk-candidate-selection-style 'ddskk-like)
(if (> skk-nr-candidate-max 0)
(set! idx (remainder idx skk-nr-candidate-max)))
(if (< idx (length skk-ddskk-like-heading-label-char-list))
@@ -1896,9 +1897,9 @@
(if (skk-context-candidate-window sc)
(begin
(cond
- ((= skk-candidate-selection-style 'uim)
+ ((eq? skk-candidate-selection-style 'uim)
(skk-context-set-nth! sc idx))
- ((= skk-candidate-selection-style 'ddskk-like)
+ ((eq? skk-candidate-selection-style 'ddskk-like)
(skk-context-set-nth! sc (+ idx (- skk-candidate-op-count 1)))))
(skk-update-preedit sc))))))
Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c 2005-08-23 13:43:31 UTC (rev 1292)
+++ branches/r5rs/sigscheme/eval.c 2005-08-23 13:53:18 UTC (rev 1293)
@@ -1737,7 +1737,7 @@
if (!SYMBOLP(var))
SigScm_ErrorObj("set-symbol-value! : require symbol but got ", var);
- return SCM_SYMBOL_VCELL(var);
+ return SCM_SYMBOL_SET_VCELL(var, val);
}
ScmObj ScmOp_bit_and(ScmObj obj1, ScmObj obj2)
More information about the uim-commit
mailing list