X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/233ba4d924933cb56129bd7511e6137b7c0b8e3e..6ccc848cd85e75d77d6b11a46f5f23f860db9ff5:/lisp/org/ob-js.el diff --git a/lisp/org/ob-js.el b/lisp/org/ob-js.el index 06acfb391b..21381725cb 100644 --- a/lisp/org/ob-js.el +++ b/lisp/org/ob-js.el @@ -1,28 +1,25 @@ ;;; ob-js.el --- org-babel functions for Javascript -;; Copyright (C) 2010-2011 Free Software Foundation +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Eric Schulte ;; Keywords: literate programming, reproducible research, js ;; Homepage: http://orgmode.org -;; Version: 7.4 -;;; License: +;; This file is part of GNU Emacs. -;; This program is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. -;; + ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -35,7 +32,7 @@ ;; - a non-browser javascript engine such as node.js http://nodejs.org/ ;; or mozrepl http://wiki.github.com/bard/mozrepl/ -;; +;; ;; - for session based evaluation mozrepl and moz.el are required see ;; http://wiki.github.com/bard/mozrepl/emacs-integration for ;; configuration instructions @@ -58,6 +55,7 @@ (defcustom org-babel-js-cmd "node" "Name of command used to evaluate js blocks." :group 'org-babel + :version "24.1" :type 'string) (defvar org-babel-js-function-wrapper @@ -132,7 +130,7 @@ specifying a variable of the same value." session)) (defun org-babel-variable-assignments:js (params) - "Return list of Javascript statements assigning the block's variables" + "Return list of Javascript statements assigning the block's variables." (mapcar (lambda (pair) (format "var %s=%s;" (car pair) (org-babel-js-var-to-js (cdr pair)))) @@ -154,11 +152,12 @@ then create. Return the initialized session." (sit-for .5) (org-babel-js-initiate-session session)))) ((string= "node" org-babel-js-cmd ) - (error "session evaluation with node.js is not supported")) + (error "Session evaluation with node.js is not supported")) (t - (error "sessions are only supported with mozrepl add \":cmd mozrepl\""))))) + (error "Sessions are only supported with mozrepl add \":cmd mozrepl\""))))) (provide 'ob-js) + ;;; ob-js.el ends here