;;; Commentary:
-;; Org-Babel support for evaluating lua source code.
+;; Org-Babel support for evaluating Lua source code.
;; Requirements:
;; for session support, lua-mode is needed.
+;;
;; lua-mode is not part of GNU Emacs/orgmode, but can be obtained
-;; from marmalade or melpa.
+;; from NonGNU ELPA (see `M-x list-packages').
+;;
;; The source repository is here:
;; https://github.com/immerrr/lua-mode
:type 'symbol)
(defcustom org-babel-lua-hline-to "None"
- "Replace hlines in incoming tables with this when translating to lua."
+ "Replace hlines in incoming tables with this when translating to Lua."
:group 'org-babel
:version "26.1"
:package-version '(Org . "8.3")
:type 'string)
(defcustom org-babel-lua-None-to 'hline
- "Replace `None' in lua tables with this before returning."
+ "Replace `None' in Lua tables with this before returning."
:group 'org-babel
:version "26.1"
:package-version '(Org . "8.3")
(org-babel--get-vars params)))
(defun org-babel-lua-var-to-lua (var)
- "Convert an elisp value to a lua variable.
-Convert an elisp value, VAR, into a string of lua source code
+ "Convert an Emacs Lisp value to a Lua variable.
+Convert an Emacs Lisp value, VAR, into a string of Lua source code
specifying a variable of the same value."
(if (listp var)
(if (and (= 1 (length var)) (not (listp (car var))))
(defvar lua-which-bufname)
(defvar lua-shell-buffer-name)
(defun org-babel-lua-initiate-session-by-key (&optional session)
- "Initiate a lua session.
+ "Initiate a Lua session.
If there is not a current inferior-process-buffer in SESSION
then create. Return the initialized session."
;; (require org-babel-lua-mode)
"Evaluate BODY in external Lua process.
If RESULT-TYPE equals `output' then return standard output as a
string. If RESULT-TYPE equals `value' then return the value of the
-last statement in BODY, as elisp.
+last statement in BODY, as Emacs Lisp.
RESULT-PARAMS list all the :result header arg parameters.
PREAMBLE string is appended to BODY."
(let ((raw
"Pass BODY to the Lua process in SESSION.
If RESULT-TYPE equals `output' then return standard output as a
string. If RESULT-TYPE equals `value' then return the value of the
-last statement in BODY, as elisp."
+last statement in BODY, as Emacs Lisp."
(let* ((send-wait (lambda () (comint-send-input nil t) (sleep-for 0.005)))
(dump-last-value
(lambda