mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-25 15:32:52 +00:00
Alter org-babel-number-p so that it recognises negative numbers
This commit is contained in:
parent
b085fafc8b
commit
dc66d84ac4
|
@ -704,7 +704,7 @@ This is taken almost directly from `org-read-prop'."
|
|||
|
||||
(defun org-babel-number-p (string)
|
||||
"Return t if STRING represents a number"
|
||||
(if (and (string-match "^[[:digit:]]*\\.?[[:digit:]]*$" string)
|
||||
(if (and (string-match "^-?[[:digit:]]*\\.?[[:digit:]]*$" string)
|
||||
(= (match-end 0) (length string)))
|
||||
(string-to-number string)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue