diff options
author | Bastien Guerry <bzg@altern.org> | 2012-09-28 17:59:22 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-09-28 17:59:22 +0200 |
commit | 6e7b6cae4fc515c0ed8b5bdc322f38e7087da078 (patch) | |
tree | 3229c0b94ac421eba947e3794cb0cab6bd4fdc82 | |
parent | 222eae4033d2634dbba72a2e6b0229fc3d1b6a74 (diff) | |
download | org-mode-6e7b6cae4fc515c0ed8b5bdc322f38e7087da078.tar.gz |
org-table.el: Warn with a message when formulas have been updated
* org-table.el (org-table-fix-formulas): Warn with a message
when formulas have been updated.
-rw-r--r-- | lisp/org-table.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el index 782e309..fa7ffd2 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -2179,7 +2179,8 @@ For all numbers larger than LIMIT, shift them by DELTA." (save-excursion (goto-char (org-table-end)) (when (let ((case-fold-search t)) (looking-at "[ \t]*#\\+tblfm:")) - (let ((re (concat key "\\([0-9]+\\)")) + (let ((msg "The formulas in #+TBLFM have been updated") + (re (concat key "\\([0-9]+\\)")) (re2 (when remove (if (or (equal key "$") (equal key "$LR")) @@ -2199,10 +2200,11 @@ For all numbers larger than LIMIT, shift them by DELTA." (setq s (match-string 1) n (string-to-number s)) (cond ((setq a (assoc s replace)) - (replace-match (concat key (cdr a)) t t)) + (replace-match (concat key (cdr a)) t t) + (message msg)) ((and limit (> n limit)) - (replace-match (concat key (int-to-string (+ n delta))) - t t))))))))) + (replace-match (concat key (int-to-string (+ n delta))) t t) + (message msg))))))))) (defun org-table-get-specials () "Get the column names and local parameters for this table." |