1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-22 07:09:47 +00:00

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.
This commit is contained in:
Eric Schulte 2014-08-03 21:32:14 -04:00
parent 0feec82c63
commit 003eddb82e

View File

@ -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)))))))