summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gratz <Stromeko@Stromeko.DE>2013-04-07 09:14:07 (GMT)
committer Achim Gratz <Stromeko@Stromeko.DE>2013-04-07 09:16:45 (GMT)
commitaf6f32af1ab4328f9fb9eb84633e4761ce9126f7 (patch)
tree484b385abb2ee323ea67133f8093131a7518244a
parent4c804d272004a1179c46a2fe97bac7add5ea4b09 (diff)
downloadorg-mode-af6f32af1ab4328f9fb9eb84633e4761ce9126f7.zip
org-mode-af6f32af1ab4328f9fb9eb84633e4761ce9126f7.tar.gz
fix commit df0c8a3bc44286c06b3306503a95382805651e2c
* lisp/ob-core.el (org-babel-number-p): String match for any number moved first so that the match data for the length check does not become corrupted.
-rw-r--r--lisp/ob-core.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index b8f863f..c3d7b0f 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2525,8 +2525,8 @@ appropriate."
(defun org-babel-number-p (string)
"If STRING represents a number return its value."
- (if (and (string-match "^-?[0-9]*\\.?[0-9]*$" string)
- (string-match "[0-9]+" string)
+ (if (and (string-match "[0-9]+" string)
+ (string-match "^-?[0-9]*\\.?[0-9]*$" string)
(= (length (substring string (match-beginning 0)
(match-end 0)))
(length string)))