diff options
author | Oleh Krehel <ohwoeowho@gmail.com> | 2014-01-02 11:07:27 +0100 |
---|---|---|
committer | Oleh Krehel <ohwoeowho@gmail.com> | 2014-01-02 11:10:39 +0100 |
commit | 13bb11695b45e6b3f4fb849c499259f9ed3d7dd4 (patch) | |
tree | b8a53f85664d807b8e1f75cced368ace239194f9 | |
parent | eb5cb33218ab5af58e02e269be32ef404c2ea2f2 (diff) | |
download | org-mode-13bb11695b45e6b3f4fb849c499259f9ed3d7dd4.tar.gz |
ob-J: Fix docstrings.
* lisp/ob-J.el (org-babel-J-interleave-echos): Update docstring.
(org-babel-J-interleave-echos-except-functions): Update docstring.
(obj-get-string-alignment): Update docstring.
(obj-string-match-m): Update docstring.
-rw-r--r-- | lisp/ob-J.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ob-J.el b/lisp/ob-J.el index 5b8b0f5..97928ec 100644 --- a/lisp/ob-J.el +++ b/lisp/ob-J.el @@ -24,22 +24,26 @@ ;;; Commentary: ;; Org-Babel support for evaluating J code. -;; Session interaction depends on `j-console' provided by `j-mode'. +;; +;; Session interaction depends on `j-console' from package `j-mode' +;; (available in MELPA). ;;; Code: (require 'ob) +(declare-function j-console-ensure-session "ext:j-console" ()) + (defun org-babel-expand-body:J (body params &optional processed-params) "Expand BODY according to PARAMS, return the expanded body. PROCESSED-PARAMS isn't used yet." (org-babel-J-interleave-echos-except-functions body)) (defun org-babel-J-interleave-echos (body) - "Interleave echo'' between each source line of BODY." + "Interleave echo',' between each source line of BODY." (mapconcat #'identity (split-string body "\n") "\necho','\n")) (defun org-babel-J-interleave-echos-except-functions (body) - "Interleave echo'' between source lines of BODY that aren't functions." + "Interleave echo',' between source lines of BODY that aren't functions." (if (obj-string-match-m "\\(?:^\\|\n\\)[^\n]*\\(?:0\\|1\\|2\\|3\\|4\\|dyad\\) : 0\n.*\n)\\(?:\n\\|$\\)" body) (let ((s1 (substring body 0 (match-beginning 0))) (s2 (match-string 0 body)) @@ -99,7 +103,8 @@ This function is called by `org-babel-execute-src-block'" (defun obj-get-string-alignment (str) "Return a number to describe STR alignment. -Positive/negative/zero mean right/left/undetermined. +STR represents a table. +Positive/negative/zero result means right/left/undetermined. Don't trust first line." (let* ((str (org-trim str)) (lines (split-string str "\n" t)) @@ -154,7 +159,8 @@ Don't trust first line." (match-beginning 1))) (defun obj-string-match-m (regexp string &optional start) - "Like `sting-match', only .* includes newlines too." + "Call (string-match REGEXP STRING START). +REGEXP is modified so that .* matches newlines as well." (string-match (replace-regexp-in-string "\\.\\*" "[\0-\377[:nonascii:]]*" regexp) string |