diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-11-03 12:34:47 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-11-03 12:34:47 +0100 |
commit | 061112957844e991ff27a8b302e97863edcf943e (patch) | |
tree | d2502a7856a670ede62c4a5413cab2f3dedacf03 | |
parent | 9b5757cb47f557cd28e4d6bef48c47027f548ce8 (diff) | |
download | org-mode-061112957844e991ff27a8b302e97863edcf943e.tar.gz |
Small fixes
* lisp/ob-asymptote.el (org-babel-asymptote-define-type):
* lisp/ob-processing.el (org-babel-processing-define-type): Small fixes
following lexical binding move.
-rw-r--r-- | lisp/ob-asymptote.el | 26 | ||||
-rw-r--r-- | lisp/ob-processing.el | 21 |
2 files changed, 21 insertions, 26 deletions
diff --git a/lisp/ob-asymptote.el b/lisp/ob-asymptote.el index cf78949..0ef5834 100644 --- a/lisp/ob-asymptote.el +++ b/lisp/ob-asymptote.el @@ -123,21 +123,17 @@ a variable of the same value." DATA is a list. Return type as a symbol. -The type is `string' if any element in DATA is -a string. Otherwise, it is either `real', if some elements are -floats, or `int'." - (let* ((type 'int) - find-type ; for byte-compiler - (find-type - (function - (lambda (row) - (catch 'exit - (mapc (lambda (el) - (cond ((listp el) (funcall find-type el)) - ((stringp el) (throw 'exit (setq type 'string))) - ((floatp el) (setq type 'real)))) - row)))))) - (funcall find-type data) type)) +The type is `string' if any element in DATA is a string. +Otherwise, it is either `real', if some elements are floats, or +`int'." + (letrec ((type 'int) + (find-type + (lambda (row) + (dolist (e row type) + (cond ((listp e) (setq type (funcall find-type e))) + ((stringp e) (throw 'exit 'string)) + ((floatp e) (setq type 'real))))))) + (catch 'exit (funcall find-type data)) type)) (provide 'ob-asymptote) diff --git a/lisp/ob-processing.el b/lisp/ob-processing.el index 13ee12e..1dba42d 100644 --- a/lisp/ob-processing.el +++ b/lisp/ob-processing.el @@ -179,17 +179,16 @@ a variable of the same value." DATA is a list. Return type as a symbol. -The type is `String' if any element in DATA is -a string. Otherwise, it is either `float', if some elements are -floats, or `int'." - (let* ((type 'int) - find-type ; For byte-compiler. - (find-type - (lambda (row) - (dolist (e row type) - (cond ((listp e) (setq type (funcall find-type e))) - ((stringp e) (throw 'exit 'String)) - ((floatp e) (setq type 'float))))))) +The type is `String' if any element in DATA is a string. +Otherwise, it is either `float', if some elements are floats, or +`int'." + (letrec ((type 'int) + (find-type + (lambda (row) + (dolist (e row type) + (cond ((listp e) (setq type (funcall find-type e))) + ((stringp e) (throw 'exit 'String)) + ((floatp e) (setq type 'float))))))) (catch 'exit (funcall find-type data)))) (provide 'ob-processing) |