summaryrefslogtreecommitdiff
path: root/lisp/ses.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2007-09-23 01:08:25 +0000
committerGlenn Morris <rgm@gnu.org>2007-09-23 01:08:25 +0000
commit66ba97ee97808cfd088290e1a173e0c93459bf9f (patch)
tree86da84de416a5c300a83b162707e3984c6197e95 /lisp/ses.el
parentf3d7e5c44f5015ac69e9d184c78128635ed18852 (diff)
downloademacs-66ba97ee97808cfd088290e1a173e0c93459bf9f.tar.gz
(ses-calculate-cell): Don't evaluate unsafe formulae.
Diffstat (limited to 'lisp/ses.el')
-rw-r--r--lisp/ses.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/ses.el b/lisp/ses.el
index e19b177ef42..3f904fde0d2 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -628,8 +628,9 @@ the old and FORCE is nil."
(let ((oldval (ses-cell-value cell))
(formula (ses-cell-formula cell))
newval)
- (if (eq (car-safe formula) 'ses-safe-formula)
- (ses-set-cell row col 'formula (ses-safe-formula (cadr formula))))
+ (when (eq (car-safe formula) 'ses-safe-formula)
+ (setq formula (ses-safe-formula (cadr formula)))
+ (ses-set-cell row col 'formula formula))
(condition-case sig
(setq newval (eval formula))
(error