diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2011-03-01 10:31:00 -0700 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2011-03-01 10:31:00 -0700 |
commit | b6912331715c7da08927b3636b6721af5f5e0c41 (patch) | |
tree | c011a3d87eed3cba21387aa5b5d872b2471914f5 | |
parent | 750502e3bfdfa084c79b23cb10a82909fc097c23 (diff) | |
download | org-mode-b6912331715c7da08927b3636b6721af5f5e0c41.tar.gz |
ob: allow passing elisp vectors through to code blocks
* lisp/ob.el (org-babel-read): Pass elisp vectors through to code
blocks.
-rw-r--r-- | lisp/ob.el | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -1913,16 +1913,15 @@ block but are passed literally to the \"example-block\"." (defun org-babel-read (cell &optional inhibit-lisp-eval) "Convert the string value of CELL to a number if appropriate. -Otherwise if cell looks like lisp (meaning it starts with a \"(\" -or a \"'\") then read it as lisp, otherwise return it unmodified -as a string. Optional argument NO-LISP-EVAL inhibits lisp -evaluation for situations in which is it not appropriate." +Otherwise if cell looks like lisp (meaning it starts with a +\"(\", \"'\", \"`\" or a \"[\") then read it as lisp, otherwise +return it unmodified as a string. Optional argument NO-LISP-EVAL +inhibits lisp evaluation for situations in which is it not +appropriate." (if (and (stringp cell) (not (equal cell ""))) (or (org-babel-number-p cell) (if (and (not inhibit-lisp-eval) - (or (equal "(" (substring cell 0 1)) - (equal "'" (substring cell 0 1)) - (equal "`" (substring cell 0 1)))) + (member (substring cell 0 1) '("(" "'" "`" "["))) (eval (read cell)) (progn (set-text-properties 0 (length cell) nil cell) cell))) cell)) |