[logaling-commit] logaling/logalimacs [master] move conditions to loga-clear-condition-p function

アーカイブの一覧に戻る

null+****@clear***** null+****@clear*****
Thu Jun 7 23:32:32 JST 2012


yuta yamada	2012-06-07 23:32:32 +0900 (Thu, 07 Jun 2012)

  New Revision: cdfc4b163ba8d5213629daf263186b5b942b75de

  Log:
    move conditions to loga-clear-condition-p function

  Modified files:
    logalimacs.el

  Modified: logalimacs.el (+10 -4)
===================================================================
--- logalimacs.el    2012-06-07 22:37:38 +0900 (c32894a)
+++ logalimacs.el    2012-06-07 23:32:32 +0900 (f3f3a45)
@@ -287,14 +287,20 @@
         for (source target) in words
         for source-length = (loga-compute-length source)
         for target-length = (loga-compute-length target)
-        if (and (or (< max-source-length source-length)
-                    (< max-target-length target-length))
-                (< source-length loga-width-limit-source)
-                (loga-less-than-half-p source-length target-length))
+        if (loga-clear-condition-p max-source-length max-target-length
+                                   source-length target-length)
         do (setq max-source-length (max max-source-length source-length)
                  max-target-length (max max-target-length target-length))
         finally return (cons max-source-length max-target-length)))
 
+(defun loga-clear-condition-p (&rest arguments)
+  (if (and (or (< max-source-length source-length)
+               (< max-target-length target-length))
+           (< source-length loga-width-limit-source)
+           (loga-less-than-half-p source-length target-length))
+      t
+    nil))
+
 (defun loga-less-than-half-p (source-length target-length)
   (let* ((half (- (/ (window-width) 2) 2)))
     (if (> half (max source-length target-length))




More information about the logaling-commit mailing list
アーカイブの一覧に戻る