Browse Source

protect lisp code blocks from ending comments

* lisp/ob-lisp.el (org-babel-lisp-dir-fmt): Protect lisp code blocks
  from ending comments by adding newlines behind code in format
  strings.
Eric Schulte 10 years ago
parent
commit
003eddb82e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lisp/ob-lisp.el

+ 2 - 2
lisp/ob-lisp.el

@@ -44,7 +44,7 @@
 (defvar org-babel-header-args:lisp '((package . :any)))
 
 (defcustom org-babel-lisp-dir-fmt
-  "(let ((*default-pathname-defaults* #P%S)) %%s)"
+  "(let ((*default-pathname-defaults* #P%S\n)) %%s\n)"
   "Format string used to wrap code bodies to set the current directory.
 For example a value of \"(progn ;; %s\\n   %%s)\" would ignore the
 current directory string."
@@ -86,7 +86,7 @@ current directory string."
 						 default-directory)))
 				      (format
 				       (if dir (format org-babel-lisp-dir-fmt dir)
-					 "(progn %s)")
+					 "(progn %s\n)")
 				       (buffer-substring-no-properties
 					(point-min) (point-max)))))
 				 (cdr (assoc :package params)))))))