null+****@clear*****
null+****@clear*****
Wed Jul 4 20:29:13 JST 2012
Yuta Yamada 2012-07-04 20:29:13 +0900 (Wed, 04 Jul 2012) New Revision: c0adfa5521505b21f178999d39532217e55d0726 https://github.com/logaling/logalimacs/commit/c0adfa5521505b21f178999d39532217e55d0726 Log: loga-chop-source: Apply function that is deleted needless brackets Modified files: logalimacs.el Modified: logalimacs.el (+7 -1) =================================================================== --- logalimacs.el 2012-07-04 20:16:00 +0900 (954c660) +++ logalimacs.el 2012-07-04 20:29:13 +0900 (6e52046) @@ -357,7 +357,7 @@ Example: with source-length and target-length for (key . statement) in translation-group do (case key - ('source (setq source statement + ('source (setq source (loga-chop-source statement) source-length (loga-compute-length source))) ('target (setq target (loga-chop-target statement) target-length (loga-compute-length target))) @@ -377,6 +377,12 @@ Example: collect (loga-append-margin source target note size) into formated-words finally return formated-words)) +(defun loga-chop-source (raw-source) + (let ((tmp-source-length (loga-compute-length raw-source))) + (if (string-match "\\[.+\\]" raw-source) + (replace-regexp-in-string "\\[.+\\]" "" raw-source) + raw-source))) + (defun loga-chop-target (raw-target) (let ((tmp-target-length (loga-compute-length raw-target)) (window-half (/ (window-width) 2))) -------------- next part -------------- An HTML attachment was scrubbed... 다운로드