summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleh Krehel <ohwoeowho@gmail.com>2013-12-23 14:48:06 +0100
committerOleh Krehel <ohwoeowho@gmail.com>2013-12-23 14:48:06 +0100
commit0ef823725bc089883ec0604371e5298138f4b9a5 (patch)
treeaf590fa1142bed8db7e22ec1febe4ad1650575d5
parent7ea6c3cf38d19fd9265fe38df5e81cf05d3e521c (diff)
downloadorg-mode-0ef823725bc089883ec0604371e5298138f4b9a5.tar.gz
ob-J (obj-strip-leading-ws): Remove redundant function.
* lisp/ob-J.el (obj-strip-leading-ws): Remove function. (org-babel-J-print-block): Use `org-trim' instead.
-rw-r--r--lisp/ob-J.el9
1 files changed, 2 insertions, 7 deletions
diff --git a/lisp/ob-J.el b/lisp/ob-J.el
index 67a23c2..e470959 100644
--- a/lisp/ob-J.el
+++ b/lisp/ob-J.el
@@ -100,7 +100,7 @@ This function is called by `org-babel-execute-src-block'"
(defun org-babel-J-print-block (x)
"Prettify jconsole output X."
(if (= 1 (length x))
- (obj-strip-leading-ws (car x))
+ (org-trim (car x))
;; assume only first row is misaligned
(let ((n1 (obj-match-second-space (car x)))
(n2 (obj-match-second-space (cadr x))))
@@ -108,7 +108,7 @@ This function is called by `org-babel-execute-src-block'"
x
(if (and n1 n2)
(substring (car x) (- n1 n2))
- (obj-strip-leading-ws (car x))))
+ (org-trim (car x))))
(mapconcat #'identity x "\n"))))
(defun obj-match-second-space (s)
@@ -116,11 +116,6 @@ This function is called by `org-babel-execute-src-block'"
(and (string-match "^ *[^ ]+\\( \\)" s)
(match-beginning 1)))
-(defun obj-strip-leading-ws (s)
- "String leading whitespace from S."
- (and (string-match "^ *\\([^ ].*\\)" s)
- (match-string 1 s)))
-
(defun obj-string-match-m (regexp string &optional start)
"Like `sting-match', only .* includes newlines too."
(string-match