null+****@clear*****
null+****@clear*****
Mon Jul 2 20:07:24 JST 2012
Yuta Yamada 2012-07-02 20:07:24 +0900 (Mon, 02 Jul 2012) New Revision: 4110419d3f323daa4ace41c5c0d8cfb6725edde7 https://github.com/logaling/logalimacs/commit/4110419d3f323daa4ace41c5c0d8cfb6725edde7 Log: Move logic of async into loga-to-shell function Modified files: logalimacs.el Modified: logalimacs.el (+5 -3) =================================================================== --- logalimacs.el 2012-07-02 19:45:11 +0900 (0c8cc50) +++ logalimacs.el 2012-07-02 20:07:24 +0900 (687493f) @@ -198,8 +198,10 @@ Example: (:popup (loga-lookup-in-buffer)))) ;; @todo apply ansi-color -(defun loga-to-shell (cmd &optional arg) - (ansi-color-apply (shell-command-to-string (concat cmd " " arg " &")))) +(defun loga-to-shell (cmd &optional arg async?) + (if async? + (async-shell-command (concat cmd " " arg) "*logalimacs*") + (ansi-color-apply (shell-command-to-string (concat cmd " " arg " &"))))) (defun loga-from-symbol-to-string (symbol) (replace-regexp-in-string ":" "" (symbol-name symbol))) @@ -230,7 +232,7 @@ Example: (if mark-active (loga-return-marked-region)) (let* ((input (loga-input))) - (async-shell-command (concat "\\loga " task " " input) "*logalimacs*") + (loga-to-shell "\\loga" (concat task " " input) t) (loga-read-buffer-string) (if (and (string-match "^term '.+' already exists in '.+'" loga-buffer-string) (yes-or-no-p -------------- next part -------------- An HTML attachment was scrubbed... 다운로드