[logaling-commit] logaling/logalimacs [master] move function for language to other function

Back to archive index

null+****@clear***** null+****@clear*****
Thu Apr 12 23:47:03 JST 2012


yuta yamada	2012-04-12 23:47:03 +0900 (Thu, 12 Apr 2012)

  New Revision: 477a1e5ef9a6d950563e8b0ea96c2d849a08a39b

  Log:
    move function for language to other function

  Modified files:
    logalimacs.el

  Modified: logalimacs.el (+7 -8)
===================================================================
--- logalimacs.el    2012-03-11 21:16:47 +0900 (b3a1aad)
+++ logalimacs.el    2012-04-12 23:47:03 +0900 (3321cda)
@@ -191,14 +191,6 @@
               (:manual (loga-input))
               (t (loga-return-word-on-cursor)))))
     (setq word (concat "\"" word "\""))
-    ;; @todo delete at more than logaling version 0.1.3
-    (cond
-     (loga-use-dictionary-option t)
-     ((string-match "[ぁ-んァ-ン上-黑]" word)
-      (setq word (concat word " -S=ja -T=en")))
-     ((string-match "[a-zA-Z]" word)
-      (setq word (concat word " -S=en -T=ja"))))
-    ;; ---------------------------
     (setq content (loga-command word))
     (if (equal "" content)
         (message (concat "'" (caar loga-word-cache) content "' is not found"))
@@ -209,6 +201,13 @@
          (loga-make-popup content))
         (t (loga-make-buffer content))))))
 
+(defun loga-attach-lang-option-for-ja/en (word)
+  (cond
+   ((string-match "[ぁ-んァ-ン上-黑]" word)
+    (return (concat word " -S=ja -T=en")))
+   ((string-match "[a-zA-Z]" word)
+    (return (concat word " -S=en -T=ja")))))
+
 (defun loga-convert-from-json-to-list (content)
   (let* ((json (json-read-from-string content))
          source target note words-list)




More information about the logaling-commit mailing list
Back to archive index