Browse Source

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 4 năm trước cách đây
mục cha
commit
44cb98fdb6
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  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