summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2014-01-09 11:03:01 +0100
committerBastien Guerry <bzg@altern.org>2014-01-09 11:03:01 +0100
commita2619b714584a181667d11341f26ff12b9d212a3 (patch)
tree85bf5a8d07b49b25e09721f880194176b4f6382a
parentabed7277e1f6bfb4b901f770f2a28e060e2a96d3 (diff)
downloadorg-mode-a2619b714584a181667d11341f26ff12b9d212a3.tar.gz
org-table.el (org-table-fix-formulas): Fix commit eb28fe
Thanks to Michael Brand for reporting this.
-rw-r--r--lisp/org-table.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 261d62f..e55b685 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2275,7 +2275,8 @@ For all numbers larger than LIMIT, shift them by DELTA."
(save-excursion
(goto-char (org-table-end))
(let ((case-fold-search t)
- (s-end (save-excursion (re-search-forward "^\\S-*$\\|\\'" nil t))))
+ (s-end (min (save-excursion (re-search-forward "^\\S-*$\\|\\'" nil t))
+ (save-excursion (org-end-of-subtree t)))))
(while (re-search-forward "[ \t]*#\\+tblfm:" s-end t)
(let ((msg "The formulas in #+TBLFM have been updated")
(re (concat key "\\([0-9]+\\)"))