Переглянути джерело

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
Brandon Guttersohn 5 роки тому
батько
коміт
44cb98fdb6
1 змінених файлів з 4 додано та 1 видалено
  1. 4 1
      lisp/ob-C.el

+ 4 - 1
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