Revision: 6899 Author: ek.kato Date: Tue Jan 4 23:01:00 2011 Log: * Merge r6898 from trunk.
http://code.google.com/p/uim/source/detail?r=6899 Modified: /branches/1.6/scm/plugin.scm ======================================= --- /branches/1.6/scm/plugin.scm Tue Sep 7 23:04:47 2010 +++ /branches/1.6/scm/plugin.scm Tue Jan 4 23:01:00 2011 @@ -55,16 +55,25 @@ (define installed-im-module-list ()) (define currently-loading-module-name #f) +(define try-require-with-force-reload + (lambda (file) + (let ((loaded-str (string-append "*" file "-loaded*"))) + (if (provided? loaded-str) + (try-load file) + (try-require file))))) ;; ;; TODO: write test for load-plugin ;; returns whether initialization is succeeded (define require-module (lambda (module-name) (set! currently-loading-module-name module-name) + ;; use try-require-with-force-reload because init-handler of the + ;; im may be overwritten by stub-im handler (let ((succeeded (or (module-load module-name) - (try-require (find-module-scm-path - uim-plugin-scm-load-path - module-name))))) + (try-require-with-force-reload + (find-module-scm-path + uim-plugin-scm-load-path + module-name))))) (set! currently-loading-module-name #f) succeeded))) @@ -133,6 +142,8 @@ (let ((scm-path (find-module-scm-path uim-plugin-scm-load-path module-name))) (if (string? scm-path) - (try-require scm-path) + ;; use try-require-with-force-reload because init-handler of the + ;; im may be overwritten by stub-im handler + (try-require-with-force-reload scm-path) #t)) #f)))
