[uim-commit] r3141 - trunk/scm

yamaken at freedesktop.org yamaken at freedesktop.org
Thu Feb 23 02:27:57 PST 2006


Author: yamaken
Date: 2006-02-23 02:27:52 -0800 (Thu, 23 Feb 2006)
New Revision: 3141

Modified:
   trunk/scm/custom.scm
   trunk/scm/im-custom.scm
Log:
* scm/custom.scm
  - (key-list-strip-shift, key-list-strip-regular-shift): Simplify

* scm/im-custom.scm
  - (usable-im-list): Cosmetic change
  - Simplify the get-hook for 'enabled-im-list


Modified: trunk/scm/custom.scm
===================================================================
--- trunk/scm/custom.scm	2006-02-23 10:26:35 UTC (rev 3140)
+++ trunk/scm/custom.scm	2006-02-23 10:27:52 UTC (rev 3141)
@@ -300,9 +300,7 @@
 ;; TODO: write test
 (define key-list-strip-shift
   (lambda (key-list)
-    (remove (lambda (key)
-	      (eq? key 'Shift_key))
-	    key-list)))
+    (delete 'Shift_key key-list eq?)))
 
 ;; TODO: write test
 (define key-list-strip-regular-shift
@@ -310,9 +308,7 @@
     (let* ((str (find string? key-list))
 	   (printable (string->printable-char str)))
       (if (char-graphic? printable)
-	  (remove (lambda (key)
-		    (eq? key 'Shift_key))
-		  key-list)
+	  (key-list-strip-shift key-list)
 	  key-list))))
 
 ;; TODO: write test

Modified: trunk/scm/im-custom.scm
===================================================================
--- trunk/scm/im-custom.scm	2006-02-23 10:26:35 UTC (rev 3140)
+++ trunk/scm/im-custom.scm	2006-02-23 10:27:52 UTC (rev 3141)
@@ -211,9 +211,9 @@
 
 (define usable-im-list
   (lambda ()
-    (let ((imlist (filter
-		    (lambda (name)
-	              (memq name system-available-im-list)) enabled-im-list)))
+    (let ((imlist (filter (lambda (name)
+			    (memq name system-available-im-list))
+			  enabled-im-list)))
 	 (if (not (null? imlist))
 	     imlist
 	     '(direct)))))
@@ -231,10 +231,7 @@
 (custom-add-hook 'enabled-im-list
 		 'custom-get-hooks
 		 (lambda ()
-		   (set! enabled-im-list (remove (lambda (name)
-						   (eq? name
-							'direct))
-						 enabled-im-list))))
+		   (set! enabled-im-list (delete 'direct enabled-im-list))))
 
 ;; value dependency
 (if custom-full-featured?



More information about the uim-commit mailing list