ob-calc: Don't leave garbage on the stack

* lisp/ob-calc.el (org-babel-calc-eval-string): Clean up the stack after
  expression evaluation.
This commit is contained in:
Jan Malakhovski 2015-12-27 14:47:55 +00:00 committed by Nicolas Goaziou
parent 913741876e
commit b82d1a47cf
1 changed files with 3 additions and 1 deletions

View File

@ -89,7 +89,9 @@
(split-string (org-babel-expand-body:calc body params) "[\n\r]"))))
(save-excursion
(with-current-buffer (get-buffer "*Calculator*")
(calc-eval (calc-top 1)))))
(prog1
(calc-eval (calc-top 1))
(calc-pop 1)))))
(defun org-babel-calc-maybe-resolve-var (el)
(if (consp el)