Author: yamakenz
Date: Tue Jun 12 17:01:43 2007
New Revision: 4587

Modified:
   trunk/scm/init.scm
   trunk/scm/load-action.scm
   trunk/scm/prime.scm
   trunk/scm/uim-sh.scm

Log:
* scm/init.scm
  - (allocate-heap): Fix invalid top-level
    definition. --enable-strict-toplevel-definitions requires this fix
* scm/uim-sh.scm
  - (activate-editline): Ditto
* scm/load-action.scm
  - (do-nothing, register-widget, register-action, indicator-new,
    activity-indicator-new, actions-new, context-init-widgets,
    context-list-replace-widgets!, context-update-widgets,
    context-prop-activate-handler, context-mode-handler): Ditto
* scm/prime.scm
  - (prime-app-mode-end-stroke-list): Ditto


Modified: trunk/scm/init.scm
==============================================================================
--- trunk/scm/init.scm  (original)
+++ trunk/scm/init.scm  Tue Jun 12 17:01:43 2007
@@ -41,9 +41,10 @@
 
 ;; SIOD compatibility for SigScheme
 (if (not (symbol-bound? 'allocate-heap))
-    (define allocate-heap
-      (lambda ()
-        (%%prealloc-heaps 0))))
+    (eval '(define allocate-heap
+            (lambda ()
+              (%%prealloc-heaps 0)))
+         (interaction-environment)))
 
 ;; Performance tuning for heavy job such as custom.scm. The value 64
 ;; allocates approximately 8MB of heaps. Reduce it for less-memory

Modified: trunk/scm/load-action.scm
==============================================================================
--- trunk/scm/load-action.scm   (original)
+++ trunk/scm/load-action.scm   Tue Jun 12 17:01:43 2007
@@ -72,19 +72,19 @@
       (lambda (owner)
        translated))))
 
+(define do-nothing
+  (lambda args
+    #f))
+(define register-widget do-nothing)
+(define register-action do-nothing)
+(define indicator-new do-nothing)
+(define activity-indicator-new do-nothing)
+(define actions-new do-nothing)
+(define context-init-widgets do-nothing)
+(define context-list-replace-widgets! do-nothing)
+(define context-update-widgets do-nothing)
+(define context-prop-activate-handler do-nothing)
+(define context-mode-handler do-nothing)
+;; override above procedures
 (if enable-action?
-    (require "action.scm")
-    (begin
-      (define do-nothing
-       (lambda args
-         #f))
-      (define register-widget do-nothing)
-      (define register-action do-nothing)
-      (define indicator-new do-nothing)
-      (define activity-indicator-new do-nothing)
-      (define actions-new do-nothing)
-      (define context-init-widgets do-nothing)
-      (define context-list-replace-widgets! do-nothing)
-      (define context-update-widgets do-nothing)
-      (define context-prop-activate-handler do-nothing)
-      (define context-mode-handler do-nothing)))
+    (require "action.scm"))

Modified: trunk/scm/prime.scm
==============================================================================
--- trunk/scm/prime.scm (original)
+++ trunk/scm/prime.scm Tue Jun 12 17:01:43 2007
@@ -59,17 +59,18 @@
 (define-key prime-escape-key?         '("escape" "<Control>["))
 (define-key prime-space-key?          '(" "))
 
+(define prime-app-mode-end-stroke-list #f)
 ;;;; If you're a Vi user, modify the lines below.
 (if prime-custom-app-mode-vi?
     (begin
       ;; For Vi users
       (define-key prime-app-mode-start-key? prime-escape-key?)
-      (define prime-app-mode-end-stroke-list
-       '("i" "I" "a" "A" "o" "O" "C" "s" "S" ("c" . ("l" "w" "e" "c" "G")))))
+      (set! prime-app-mode-end-stroke-list
+           '("i" "I" "a" "A" "o" "O" "C" "s" "S" ("c" . ("l" "w" "e" "c" 
"G")))))
     (begin
       ;; Default
       (define-key prime-app-mode-start-key?  #f)
-      (define prime-app-mode-end-stroke-list #f)))
+      (set! prime-app-mode-end-stroke-list #f)))
 
 (define prime-cand-select-key?
   (lambda (key key-state)

Modified: trunk/scm/uim-sh.scm
==============================================================================
--- trunk/scm/uim-sh.scm        (original)
+++ trunk/scm/uim-sh.scm        Tue Jun 12 17:01:43 2007
@@ -97,25 +97,23 @@
                (uim-sh-loop))
              (uim-sh args))))))
 
-(if (symbol-bound? 'uim-editline-readline)
-    (begin
-      (define uim-sh-loop-orig ())
-      (define activate-editline
-       (lambda ()
-         (set! uim-sh-loop-orig uim-sh-loop)
-         (set! uim-sh-loop
-               (lambda ()
-                 (if uim-sh-opt-batch
-                     (uim-sh-loop-orig)
-                     (let* ((line (uim-editline-readline))
-                            (expr (read-from-string line))
-                            (eof (eq? (eof-val) expr)))
-                       (if (not eof)
-                           (begin
-                             ((if uim-sh-opt-strict-batch
-                                  (lambda args #f)
-                                  print)
-                              (eval expr (interaction-environment)))
-                             (uim-sh-loop))
-                           #f)))))
-       #t))))
+(define uim-sh-loop-orig ())
+(define activate-editline
+  (lambda ()
+    (set! uim-sh-loop-orig uim-sh-loop)
+    (set! uim-sh-loop
+         (lambda ()
+           (if uim-sh-opt-batch
+               (uim-sh-loop-orig)
+               (let* ((line (uim-editline-readline))
+                      (expr (read-from-string line))
+                      (eof (eq? (eof-val) expr)))
+                 (if (not eof)
+                     (begin
+                       ((if uim-sh-opt-strict-batch
+                            (lambda args #f)
+                            print)
+                        (eval expr (interaction-environment)))
+                       (uim-sh-loop))
+                     #f)))))
+    #t))

Reply via email to