diff options
author | Brandon Guttersohn <brandon@guttersohn.org> | 2020-05-24 18:23:26 +0200 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2020-05-24 18:23:26 +0200 |
commit | 44cb98fdb6b4d774382c21983b479ea430fdc5b0 (patch) | |
tree | 512e2c4415a306406fa813dfc85fd5927fec577c | |
parent | 14878f3f9ad72de5d8cf543c44f4f7bedbe0daf6 (diff) | |
download | org-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.el | 5 |
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 |