Skip to content

Commit

Permalink
Merge pull request emacs-php#38 from kermorgant/phpactor-invocation-fix
Browse files Browse the repository at this point in the history
Fix invocation of phpactor by moving some parameters definitions
  • Loading branch information
kermorgant authored Jul 27, 2018
2 parents 3f8dc20 + a64d3db commit 17819d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions phpactor.el
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,16 @@
(phpactor--add-history 'phpactor--rpc (list action arguments))
(let ((json (json-encode (list :action action
:parameters arguments)))
(cmd (phpactor--make-command-string "rpc"
(format "--working-dir=%s" (phpactor-get-working-dir))))
(json-object-type 'plist)
(json-array-type 'list)
(output (get-buffer-create "*Phpactor Output*")))
(output (get-buffer-create "*Phpactor Output*"))
(cwd (phpactor-get-working-dir))
(phpactor-executable (phpactor-find-executable)))
(with-current-buffer output (erase-buffer))
(with-current-buffer (get-buffer-create "*Phpactor Input*")
(erase-buffer)
(insert json)
(call-process-region (point-min) (point-max) (phpactor-find-executable) nil output nil "rpc" (format "--working-dir=%s" (phpactor-get-working-dir)))
(call-process-region (point-min) (point-max) phpactor-executable nil output nil "rpc" (format "--working-dir=%s" cwd))
(with-current-buffer output
(goto-char (point-min))
(json-read-object)))))
Expand Down

0 comments on commit 17819d6

Please sign in to comment.