[logaling-commit] logaling/logalimacs [master] loga-decide-source-word: apply new function

Back to archive index

null+****@clear***** null+****@clear*****
Mon Jun 11 21:21:45 JST 2012


yuta yamada	2012-06-11 21:21:45 +0900 (Mon, 11 Jun 2012)

  New Revision: 634d23c5a87e437592f39a851304260f372b2131

  Log:
    loga-decide-source-word: apply new function

  Modified files:
    logalimacs.el

  Modified: logalimacs.el (+8 -6)
===================================================================
--- logalimacs.el    2012-06-11 21:13:43 +0900 (ee9a012)
+++ logalimacs.el    2012-06-11 21:21:45 +0900 (0a799bb)
@@ -232,12 +232,7 @@
 (defun loga-lookup (&optional endpoint manual?)
   (let* (word content)
     (loga-current-command :lookup)
-    (setq word
-          (if mark-active
-              (buffer-substring-no-properties (region-beginning) (region-end))
-            (case manual?
-              (:manual (loga-input))
-              (t (loga-return-word-on-cursor)))))
+    (setq word (loga-decide-source-word manual?))
     (setq content (loga-command (concat "\"" word "\"")))
     (if (equal "" content)
         (if loga-use-fallback
@@ -248,6 +243,13 @@
          (loga-make-popup content))
         (t (loga-make-buffer content))))))
 
+(defun loga-decide-source-word (&optional manual?)
+  (if mark-active
+      (buffer-substring-no-properties (region-beginning) (region-end))
+    (case manual?
+      (:manual (loga-input))
+      (t (loga-return-word-on-cursor)))))
+
 (defun loga-attach-lang-option-for-ja/en (word)
   (cond
    ((string-match "[ぁ-んァ-ン上-黑]" word)




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