null+****@clear*****
null+****@clear*****
Sat Jan 14 23:19:25 JST 2012
yuta yamada 2012-01-14 23:19:25 +0900 (Sat, 14 Jan 2012) New Revision: f05df1d346c42548e54901aafa7af70121330871 Log: apply loga-lookup-for-rurema Added files: logalimacs-rurema.el Modified files: logalimacs.el Added: logalimacs-rurema.el (+19 -0) 100644 =================================================================== --- /dev/null +++ logalimacs-rurema.el 2012-01-14 23:19:25 +0900 (b88aee7) @@ -0,0 +1,19 @@ +;; this program is frontend for myrurema +;; (requirement myrurema for Ruby gem and logalimacs) + +;;; install (see also https://github.com/yhara/myrurema) +;; % gem install myrurema +;; % rurema --init +;;; when update database +;; % rurema --update + +;; todo support multiple word +(defun loga-lookup-for-rurema (&optional word-for-fly-mode) + "" + (interactive) + (let* ((word (or word-for-fly-mode + (loga-point-or-read-string "Search word here: ")))) + (save-current-buffer + (loga-prompt-command "\\rurema" (concat word " --no-ask") nil t)))) + +(provide 'logalimacs-rurema) Modified: logalimacs.el (+4 -2) =================================================================== --- logalimacs.el 2012-01-14 23:18:13 +0900 (320f06c) +++ logalimacs.el 2012-01-14 23:19:25 +0900 (b673b31) @@ -60,11 +60,13 @@ ((equal task "version") (loga-prompt-command task)) ((equal task "loga-fly-mode") (loga-fly-mode)))))) -(defun loga-prompt-command (cmd &optional arg help) +(defun loga-prompt-command (task &optional arg help ext) "this function is wrapped program that pass to shell-command" (let* ((to-shell '(lambda () (shell-command-to-string - (concat "\\loga " cmd " " arg (unless help " &")))))) + (if ext + (concat task " " arg " &") + (concat "\\loga " task " " arg (unless help " &"))))))) (loga-make-buffer (funcall to-shell)))) (defun loga-make-buffer(content)