print Perl variables with a format string

Don't use princ because it doesn't always return a string.

Thanks to Rick Frankel for pointing this out.

* lisp/ob-perl.el (org-babel-perl--var-to-perl): Print Perl variables
  with a format string.
This commit is contained in:
Eric Schulte 2013-03-24 18:25:42 -06:00
parent 9ae225f48a
commit 727a22e327

View file

@ -87,7 +87,7 @@ specifying a var of the same value."
(concat "[\n"
(mapconcat #'org-babel-perl--var-to-perl var "")
prefix "]"))
(concat "q(" (princ var) ")"))
(format "q(%s)" var))
(unless (zerop org-babel-perl--lvl) ",\n")))))
(defvar org-babel-perl-buffers '(:default . nil))