null+****@clear*****
null+****@clear*****
Fri Jun 29 21:38:32 JST 2012
yuta yamada 2012-06-29 21:38:32 +0900 (Fri, 29 Jun 2012) New Revision: 3c233cf289de9375a780ca5f8a5b814d55f761fe https://github.com/logaling/logalimacs/commit/3c233cf289de9375a780ca5f8a5b814d55f761fe Log: loga-produce-contents: Move logic for lookup and create new function Modified files: logalimacs.el Modified: logalimacs.el (+7 -4) =================================================================== --- logalimacs.el 2012-06-29 21:17:58 +0900 (4782d12) +++ logalimacs.el 2012-06-29 21:38:32 +0900 (2b09ee2) @@ -194,10 +194,7 @@ (word-and-options (loga-lookup-attach-option search-word))) (setq loga-base-buffer (current-buffer)) (case loga-current-command - (:lookup - (loga-register-output - (cons search-word (loga-to-shell loga (concat task " " word-and-options)))) - (cdar loga-word-cache)) + (:lookup (loga-produce-contents search-word word-and-options)) ((:add :update) (loga-add/update task)) ((:show :list) (loga-make-buffer (loga-to-shell loga task))) @@ -206,6 +203,12 @@ ((:register :unregister :version) (minibuffer-message (loga-to-shell loga task)))))) +(defun loga-produce-contents (search-word word-and-options) + (let ((terminal-output + (loga-to-shell "\\loga" (concat "lookup " word-and-options)))) + (loga-register-output (cons search-word terminal-output)) + terminal-output)) + (defun loga-add/update (task) (let* ((input (loga-input)) (spew-message (loga-to-shell "\\loga" (concat task " " input)))) -------------- next part -------------- An HTML attachment was scrubbed... Download