summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2011-03-03 22:06:08 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2011-03-03 22:16:36 +0100
commitdf78e9ff4eb8e168e628fbaedf5398db0678c9a5 (patch)
tree7a48a95af7c076bdae42abb3e6da5213f887106e
parent236cdb292a2eff8f998a7bf987cb0bf4671e740c (diff)
downloadorg-mode-df78e9ff4eb8e168e628fbaedf5398db0678c9a5.tar.gz
ttt
-rw-r--r--lisp/org-table.el7
1 files changed, 2 insertions, 5 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 7ccd3cd..f96cfb4 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2394,12 +2394,9 @@ not overwrite the stored one."
t t form)))
(setq form0 form)
;; Insert the references to fields in same row
- (while (string-match "\\$\\([-+]?[0-9]+\\)" form)
+ (while (string-match "\\$\\(\\([-+]\\)?[0-9]+\\)" form)
(setq n (+ (string-to-number (match-string 1 form))
- (if (member (substring form (match-beginning 1)
- (1+ (match-beginning 1)))
- '("+" "-"))
- n0 0))
+ (if (match-end 2) n0 0))
x (nth (1- (if (= n 0) n0 (max n 1))) fields))
(unless x (error "Invalid field specifier \"%s\""
(match-string 0 form)))