diff options
author | stardiviner <numbchild@gmail.com> | 2018-04-01 17:42:07 +0800 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-04-02 20:42:42 +0200 |
commit | 174e9d1ec94caaa1a13f9f0d37d6483456677ec7 (patch) | |
tree | 1350d0d3bbf4b0efb9f6d256d3c4e45aba9c3800 | |
parent | f57df8fc74df1b76aca35bcf0315636b4d3071f3 (diff) | |
download | org-mode-174e9d1ec94caaa1a13f9f0d37d6483456677ec7.tar.gz |
Fix org-babel-js-initiate-session
* ob-js.el (org-babel-js-initiate-session): Add required optional
second argument.
-rw-r--r-- | lisp/ob-js.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/ob-js.el b/lisp/ob-js.el index f18aa9d..1da2996 100644 --- a/lisp/ob-js.el +++ b/lisp/ob-js.el @@ -43,6 +43,7 @@ (declare-function run-mozilla "ext:moz" (arg)) (declare-function httpd-start "simple-httpd" ()) (declare-function run-skewer "skewer-mode" ()) +(declare-function skewer-repl "skewer-repl" ()) (declare-function indium-run-node "indium-nodejs" (command)) (declare-function indium-eval "indium-interaction" (string &optional callback)) @@ -156,8 +157,8 @@ specifying a variable of the same value." (car pair) (org-babel-js-var-to-js (cdr pair)))) (org-babel--get-vars params))) -(defun org-babel-js-initiate-session (&optional session) - "If there is not a current inferior-process-buffer in SESSION +(defun org-babel-js-initiate-session (&optional session _params) + "If there is not a current inferior-process-buffer in `SESSION' then create. Return the initialized session." (cond ((string= session "none") @@ -165,12 +166,14 @@ then create. Return the initialized session." ((string= "*skewer-repl*" session) (require 'skewer-repl) (let ((session-buffer (get-buffer "*skewer-repl*"))) - (if (and (org-babel-comint-buffer-livep (get-buffer session-buffer)) + (if (and session-buffer + (org-babel-comint-buffer-livep (get-buffer session-buffer)) (comint-check-proc session-buffer)) session-buffer ;; start skewer REPL. (httpd-start) (run-skewer) + (skewer-repl) session-buffer))) ((string= "*Javascript REPL*" session) (require 'js-comint) |