null+****@clear*****
null+****@clear*****
Thu Jun 7 22:37:38 JST 2012
yuta yamada 2012-06-07 22:37:38 +0900 (Thu, 07 Jun 2012) New Revision: 9719733af69ffc2528d8407beed032136838acde Log: Use the with statement instead of let* Modified files: logalimacs.el Modified: logalimacs.el (+12 -12) =================================================================== --- logalimacs.el 2012-06-07 22:31:57 +0900 (854fe18) +++ logalimacs.el 2012-06-07 22:37:38 +0900 (c32894a) @@ -282,18 +282,18 @@ record)) (defun loga-compute-max-length (words) - (let* ((max-source-length 0) - (max-target-length 0)) - (loop 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)) - 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)))) + (loop with max-source-length = 0 + with max-target-length = 0 + 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)) + 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-less-than-half-p (source-length target-length) (let* ((half (- (/ (window-width) 2) 2)))