Function: org-babel-join-splits-near-ch

org-babel-join-splits-near-ch is a byte-compiled function defined in ob-core.el.gz.

Signature

(org-babel-join-splits-near-ch CH LIST)

Documentation

Join splits where "=" is on either end of the split.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-core.el.gz
(defun org-babel-join-splits-near-ch (ch list)
  "Join splits where \"=\" is on either end of the split."
  (let ((last= (lambda (str) (= ch (aref str (1- (length str))))))
	(first= (lambda (str) (= ch (aref str 0)))))
    (reverse
     (cl-reduce (lambda (acc el)
		  (let ((head (car acc)))
		    (if (and head (or (funcall last= head) (funcall first= el)))
			(cons (concat head el) (cdr acc))
		      (cons el acc))))
		list :initial-value nil))))