summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <eric.schulte@gmx.com>2012-01-23 19:43:28 -0700
committerEric Schulte <eric.schulte@gmx.com>2012-01-23 19:43:28 -0700
commitfce92180d162c2c2d4487a719c078c5b33f941b3 (patch)
tree8458da6f30acdefbcf850aa29bd7b1741514570f
parent10b06ae53cb29f2eedd9a2db405ca6084a8377b2 (diff)
parent269a509615095e2e2d271a9e33d799d41744047a (diff)
downloadorg-mode-fce92180d162c2c2d4487a719c078c5b33f941b3.tar.gz
Merge branch 'origin-maint'
-rw-r--r--doc/org.texi4
-rw-r--r--lisp/ob.el12
2 files changed, 13 insertions, 3 deletions
diff --git a/doc/org.texi b/doc/org.texi
index b238210..2763b207 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -13684,6 +13684,10 @@ inheritance}).}.
#+END_SRC
@end example
+The @code{org-babel-noweb-separator} variable holds the string used to
+separate accumulate noweb references like those above. By default this
+variable holds a newline.
+
@node cache, sep, noweb-ref, Specific header arguments
@subsubsection @code{:cache}
diff --git a/lisp/ob.el b/lisp/ob.el
index e2eb578..ee1b8bc 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -120,6 +120,11 @@ be used."
:group 'org-babel
:type 'string)
+(defcustom org-babel-noweb-separator "\n"
+ "String used to separate accumulated noweb references."
+ :group 'org-babel
+ :type 'string)
+
(defvar org-babel-src-name-regexp
"^[ \t]*#\\+name:[ \t]*"
"Regular expression used to match a source name line.")
@@ -2206,7 +2211,7 @@ block but are passed literally to the \"example-block\"."
(c-wrap (cadr cs))))
(org-babel-tangle-comment-links i))
body)))
- (setq expansion (concat expansion full))))
+ (setq expansion (cons full expansion))))
(org-babel-map-src-blocks nil
(let ((i (org-babel-get-src-block-info 'light)))
(when (equal (or (cdr (assoc :noweb-ref (nth 2 i)))
@@ -2220,8 +2225,9 @@ block but are passed literally to the \"example-block\"."
(c-wrap (cadr cs))))
(org-babel-tangle-comment-links i))
body)))
- (setq expansion (concat expansion full))))))))
- expansion)
+ (setq expansion (cons full expansion))))))))
+ (mapconcat #'identity (nreverse expansion)
+ org-babel-noweb-separator))
;; possibly raise an error if named block doesn't exist
(if (member lang org-babel-noweb-error-langs)
(error "%s" (concat