[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 6fbeac84e6: * lisp/ob-lua.el: Fix checkdoc warnings
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 6fbeac84e6: * lisp/ob-lua.el: Fix checkdoc warnings |
Date: |
Wed, 13 Sep 2023 06:58:35 -0400 (EDT) |
branch: externals/org
commit 6fbeac84e65cbdcb9d4f0e860fa85814029f57fd
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
* lisp/ob-lua.el: Fix checkdoc warnings
(org-babel-execute:lua):
(org-babel-variable-assignments:lua):
(org-babel-lua-with-earmuffs):
(org-babel-lua-without-earmuffs):
(org-babel-lua-evaluate):
(org-babel-lua-evaluate-external-process):
(org-babel-lua-read-string): Add or modify docstrings, documenting all
the function arguments.
---
lisp/ob-lua.el | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/lisp/ob-lua.el b/lisp/ob-lua.el
index 81521d9e0a..dd02d6aee7 100644
--- a/lisp/ob-lua.el
+++ b/lisp/ob-lua.el
@@ -82,7 +82,7 @@ This will typically be `lua-mode'."
:type 'symbol)
(defun org-babel-execute:lua (body params)
- "Execute a block of Lua code with Babel.
+ "Execute Lua BODY according to PARAMS.
This function is called by `org-babel-execute-src-block'."
(let* ((session (org-babel-lua-initiate-session
(cdr (assq :session params))))
@@ -129,7 +129,8 @@ VARS contains resolved variable references."
;; helper functions
(defun org-babel-variable-assignments:lua (params)
- "Return a list of Lua statements assigning the block's variables."
+ "Return a list of Lua statements assigning the block's variables.
+The variable definitions are defining in PARAMS."
(mapcar
(lambda (pair)
(format "%s=%s"
@@ -176,6 +177,7 @@ Emacs-lisp table, otherwise return the results as a string."
(cdr (assoc session org-babel-lua-buffers)))
(defun org-babel-lua-with-earmuffs (session)
+ "Return buffer name for SESSION, as *SESSION*."
(let ((name (if (stringp session) session (format "%s" session))))
(if (and (string= "*" (substring name 0 1))
(string= "*" (substring name (- (length name) 1))))
@@ -183,6 +185,7 @@ Emacs-lisp table, otherwise return the results as a string."
(format "*%s*" name))))
(defun org-babel-lua-without-earmuffs (session)
+"Remove stars around *SESSION*, leaving SESSION."
(let ((name (if (stringp session) session (format "%s" session))))
(if (and (string= "*" (substring name 0 1))
(string= "*" (substring name (- (length name) 1))))
@@ -281,7 +284,11 @@ fd:close()")
(defun org-babel-lua-evaluate
(session body &optional result-type result-params preamble)
- "Evaluate BODY as Lua code."
+ "Evaluate BODY in SESSION as Lua code.
+RESULT-TYPE and RESULT-PARAMS are passed to
+`org-babel-lua-evaluate-session' or
+`org-babel-lua-evaluate-external-process'.
+PREAMBLE is passed to `org-babel-lua-evaluate-external-process'."
(if session
(org-babel-lua-evaluate-session
session body result-type result-params)
@@ -290,10 +297,12 @@ fd:close()")
(defun org-babel-lua-evaluate-external-process
(body &optional result-type result-params preamble)
- "Evaluate BODY in external lua 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 elisp.
+RESULT-PARAMS list all the :result header arg parameters.
+PREAMBLE string is appended to BODY."
(let ((raw
(pcase result-type
(`output (org-babel-eval org-babel-lua-command
@@ -399,7 +408,7 @@ fd:close()"
(org-babel-lua-table-or-string results)))))
(defun org-babel-lua-read-string (string)
- "Strip single quotes from around Lua string."
+ "Strip single quotes from around Lua STRING."
(org-unbracket-string "'" "'" string))
(provide 'ob-lua)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org 6fbeac84e6: * lisp/ob-lua.el: Fix checkdoc warnings,
ELPA Syncer <=