From ad5ced41b517f364f61774e7b9ee8a8f1533c9c6 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 18 Jun 2024 21:27:01 +0200 Subject: [PATCH] * lisp/org/ob-lua.el: Minor doc fixes. (cherry picked from commit a7dff8c53dde18c703f470cde9ad033cffe8c766) --- lisp/org/ob-lua.el | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lisp/org/ob-lua.el b/lisp/org/ob-lua.el index 041abfabcd0..980a7109538 100644 --- a/lisp/org/ob-lua.el +++ b/lisp/org/ob-lua.el @@ -23,12 +23,14 @@ ;;; 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 @@ -68,14 +70,14 @@ This will typically be `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") @@ -145,8 +147,8 @@ The variable definitions are defining in PARAMS." (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)))) @@ -207,7 +209,7 @@ Emacs-lisp table, otherwise return the results as a string." (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) @@ -317,7 +319,7 @@ PREAMBLE is passed to `org-babel-lua-evaluate-external-process'." "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 @@ -353,7 +355,7 @@ PREAMBLE string is appended to BODY." "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 -- 2.39.2