[uim-commit] r615 - in trunk: doc scm
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Feb 8 21:38:58 PST 2005
Author: yamaken
Date: 2005-02-08 21:38:55 -0800 (Tue, 08 Feb 2005)
New Revision: 615
Modified:
trunk/doc/DOT-UIM
trunk/scm/custom-rt.scm
Log:
* This commit makes define-key in ~/.uim taking effect again
* scm/custom-rt.scm
- (custom-call-hook-procs): New procedure
- (custom-set-value!): Simplify with custom-call-hook-procs
- (define-custom): Don't define key predicate if define-key'ed one
already exists
* doc/DOT-UIM
- Modify "Configuring key bindings" section about prerequisites
Modified: trunk/doc/DOT-UIM
===================================================================
--- trunk/doc/DOT-UIM 2005-02-09 00:25:00 UTC (rev 614)
+++ trunk/doc/DOT-UIM 2005-02-09 05:38:55 UTC (rev 615)
@@ -28,27 +28,6 @@
installed-im-module-list
-* Configuring key bindings
-
- To configure key bindings in ~/.uim, write 'define-key' forms. See
- also doc/KEY for further information
-
- Be careful about following two issues.
-
- - Meaning of the key expression such as "<Control>a" differs
- between define-key and uim-pref.
-
- "<Control>a" is interpreted as case sensitive and shift
- insensitive by define-key. But uim-pref recognizes it as case
- insensitive and shift sensitive. The different rule of uim-pref
- is introduced to unifiy "<Control>a" and "<Control>A" regardless
- of caps lock status.
-
- - define-key written in ~/.uim will be ignored by uim 0.4.6 alpha1
-
- We will resolve it.
-
-
* Overriding lazy-loaded settings
The lazy-loading feature introduced in uim 0.4.6 has caused the
@@ -85,3 +64,27 @@
(require-module "pyload")
(require-module "viqr")
(require-module "anthy")
+
+
+* Configuring key bindings
+
+ To configure key bindings in ~/.uim, write 'define-key' forms. See
+ also doc/KEY for further information
+
+ Be careful about following two issues.
+
+ - Corresponding input method must be loaded by 'require-module'
+ before define-key. This implies that define-key described in
+ ~/.uim disables lazy-loading for the input method.
+
+ (require-module "skk")
+ (define-key skk-cancel-key? "<Control>[")
+
+ - Meaning of the key expression such as "<Control>a" differs
+ between define-key and uim-pref.
+
+ "<Control>a" is interpreted as case sensitive and shift
+ insensitive by define-key. But uim-pref recognizes it as case
+ insensitive and shift sensitive. The different rule of uim-pref
+ is introduced to unifiy "<Control>a" and "<Control>A" regardless
+ of caps lock status.
Modified: trunk/scm/custom-rt.scm
===================================================================
--- trunk/scm/custom-rt.scm 2005-02-09 00:25:00 UTC (rev 614)
+++ trunk/scm/custom-rt.scm 2005-02-09 05:38:55 UTC (rev 615)
@@ -114,7 +114,15 @@
(alist-replace (cons custom-sym proc)
custom-set-hooks)))))
+;; TODO: write test
;; lightweight implementation
+(define custom-call-hook-procs
+ (lambda (sym hook)
+ (let ((proc (assq sym hook)))
+ (if proc
+ ((cdr proc))))))
+
+;; lightweight implementation
(define define-custom-group
(lambda (gsym label desc)
#f))
@@ -155,11 +163,11 @@
#t)
(else
#f))
- (let ((hook (assq sym custom-set-hooks)))
- (if hook
- ((cdr hook)))
+ (begin
+ (custom-call-hook-procs sym custom-set-hooks)
#t))))
+;; TODO: rewrite test
;; lightweight implementation
(define define-custom
(lambda (sym default groups type label desc)
@@ -172,10 +180,13 @@
default)))
(eval (list 'define sym quoted-default)
toplevel-env)
- (if (eq? (car type)
- 'key)
- (eval (list 'define (symbolconc sym '?) list)))
- (custom-set-value! sym default)))))) ;; to apply hooks
+ (if (custom-key-exist? sym)
+ ;; already define-key'ed in ~/.uim
+ (custom-call-hook-procs sym custom-set-hooks)
+ (begin
+ (eval (list 'define (symbolconc sym '?) list)
+ toplevel-env)
+ (custom-set-value! sym default)))))))) ;; to apply hooks
;; lightweight implementation
;; warning: no validation performed
More information about the Uim-commit
mailing list