[uim-commit] r897 - in trunk: . doc/api-doc scm

yamaken at freedesktop.org yamaken at freedesktop.org
Sun Jun 19 18:35:52 PDT 2005


Author: yamaken
Date: 2005-06-19 18:35:48 -0700 (Sun, 19 Jun 2005)
New Revision: 897

Modified:
   trunk/doc/api-doc/uim-devel.db
   trunk/scm/init.scm
   trunk/test.sh.in
Log:
* scm/init.scm
  - (load-modules):
    * Recover backward compatible behavior of LIBUIM_VANILLA=1. The
      behavior is needed by any unit tests defined in ./tests

      - disable ~/.uim, user customs, lazy loading, loading modules

    * Add new behavior of LIBUIM_VANILLA=2 as introduced in r893.

      - disable ~/.uim, user customs and lazy loading, but enable
        loading modules

* test.sh.in
  - Rewrite LIBUIM_VANILLA=1 with LIBUIM_VANILLA=2 to follow above
    change
* doc/api-doc/uim-devel.db
  - Rewrite explanation of LIBUIM_VANILLA roughly


Modified: trunk/doc/api-doc/uim-devel.db
===================================================================
--- trunk/doc/api-doc/uim-devel.db	2005-06-19 18:29:37 UTC (rev 896)
+++ trunk/doc/api-doc/uim-devel.db	2005-06-20 01:35:48 UTC (rev 897)
@@ -457,12 +457,23 @@
       </varlistentry>
       
       <varlistentry>
-	<term>LUBUIM_VANILLA</term>
+	<term>LIBUIM_VANILLA</term>
 	<listitem>
 	  <para>
-	    This variable takes any values. Regardless of their value, if variable
-	    is defined, uim doesn't read any configuration files. (Note, even 'export
-	    LIBUIM_VANILLA=0' means uim doesn't read any configs.)
+	    This variable takes an integer value. uim changes its
+	    behavior as follows if variable is defined.
+	  <programlisting>
+	LIBUIM_VANILLA=2 : vanilla + toppings
+       ;; disable ~/.uim, user customs and lazy loading, but enable loading
+       ;; modules
+
+	LIBUIM_VANILLA=1 : pure vanilla
+       ;; disable ~/.uim, user customs, lazy loading, loading modules
+
+	undefined : fully flavored
+       ;; enable ~/.uim, user customs, lazy loading if required, and loading
+       ;; modules
+	  </programlisting>
 	  </para>
 	</listitem>
       </varlistentry>

Modified: trunk/scm/init.scm
===================================================================
--- trunk/scm/init.scm	2005-06-19 18:29:37 UTC (rev 896)
+++ trunk/scm/init.scm	2005-06-20 01:35:48 UTC (rev 897)
@@ -64,15 +64,29 @@
   (lambda ()
     (if (not (memq 'direct enabled-im-list))
 	(set! enabled-im-list (append enabled-im-list '(direct))))
-    
-    (if (getenv "LIBUIM_VANILLA")
+
+    (let ((vanilla (getenv "LIBUIM_VANILLA")))
+      (cond
+       ;; vanilla + toppings:
+       ;; disable ~/.uim, user customs and lazy loading, but enable loading
+       ;; modules
+       ((equal? vanilla "2")
+	(set! enable-lazy-loading? #f)
+	(load-enabled-modules))
+
+       ;; pure vanilla:
+       ;; disable ~/.uim, user customs, lazy loading, loading modules
+       (vanilla	;; "1", legacy "0", and so on
 	(set! enable-lazy-loading? #f))
 
-    (if enable-lazy-loading?
-	(require "lazy-load.scm"))
+       ;; fully flavored:
+       ;; enable ~/.uim, user customs, lazy loading if required, and loading
+       ;; modules
+       (else
+	(if enable-lazy-loading?
+	    (require "lazy-load.scm"))
+	(load-enabled-modules))))
 
-    (load-enabled-modules)
-
     ;; must be loaded at last of IMs
     (if (not (retrieve-im 'direct))
 	(require-module "direct"))))

Modified: trunk/test.sh.in
===================================================================
--- trunk/test.sh.in	2005-06-19 18:29:37 UTC (rev 896)
+++ trunk/test.sh.in	2005-06-20 01:35:48 UTC (rev 897)
@@ -3,8 +3,8 @@
 
 LIBUIM_VERBOSE=4; export LIBUIM_VERBOSE
 LD_LIBRARY_PATH=uim/.libs/:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
-# not to read ~/.uim
-LIBUIM_VANILLA=1; export LIBUIM_VANILLA
+# disable reading ~/.uim
+LIBUIM_VANILLA=2; export LIBUIM_VANILLA
 # scheme files will be read from scm/
 LIBUIM_SCM_FILES=@SRCDIR@/scm/; export LIBUIM_SCM_FILES
 LIBUIM_PLUGIN_LIB_DIR=@SRCDIR@/uim/.libs/; export LIBUIM_PLUGIN_LIB_DIR



More information about the uim-commit mailing list