null+****@clear*****
null+****@clear*****
Fri Feb 3 13:35:59 JST 2012
yuta yamada 2012-02-03 13:35:59 +0900 (Fri, 03 Feb 2012) New Revision: 65fb7b2655acdb2a1bbb35de497de3fbcc73e4c4 Log: apply to reject hiragana when string include kanji for lookup Modified files: logalimacs.el Modified: logalimacs.el (+7 -2) =================================================================== --- logalimacs.el 2012-02-02 19:19:27 +0900 (cde48a6) +++ logalimacs.el 2012-02-03 13:35:59 +0900 (f2f2c57) @@ -199,7 +199,7 @@ (loga-lookup nil :manual)) ;;;###autoload -(defun loga-lookup-popup-dwim () +(defun loga-lookup-in-popup () "Display the output of loga-lookup at tooltip, note require popup.el" (interactive) (loga-lookup :popup nil) @@ -215,7 +215,12 @@ (backward-word) (word-at-point))) (if loga-log-output (print match-word)) ;;log - match-word))) + (if (string-match "[上-黑]" match-word) + (loga-reject-hiragana match-word) + match-word)))) + +(defun loga-reject-hiragana (str) + (replace-regexp-in-string "[ぁ-ん]" "" str)) (defun loga-make-buffer(content) "create buffer for logalimacs"