summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Guttersohn <brandon@guttersohn.org>2020-05-24 18:23:26 +0200
committerBastien <bzg@gnu.org>2020-05-24 18:23:26 +0200
commit44cb98fdb6b4d774382c21983b479ea430fdc5b0 (patch)
tree512e2c4415a306406fa813dfc85fd5927fec577c
parent14878f3f9ad72de5d8cf543c44f4f7bedbe0daf6 (diff)
downloadorg-mode-44cb98fdb6.tar.gz
lisp/ob-C.el: Small fix to include expansion
* lisp/ob-C.el (org-babel-C-expand-C): When expanding include directives, wrap filenames in quotes if they do not begin with "<". TINYCHANGE
-rw-r--r--lisp/ob-C.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/ob-C.el b/lisp/ob-C.el
index 3a26bc0..c3e72c6 100644
--- a/lisp/ob-C.el
+++ b/lisp/ob-C.el
@@ -232,7 +232,10 @@ its header arguments."
(list
;; includes
(mapconcat
- (lambda (inc) (format "#include %s" inc))
+ (lambda (inc)
+ (if (string-prefix-p "<" inc)
+ (format "#include %s" inc)
+ (format "#include \"%s\"" inc)))
includes "\n")
;; defines
(mapconcat