summaryrefslogtreecommitdiff
path: root/lisp/ses.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2007-09-23 01:07:23 +0000
committerGlenn Morris <rgm@gnu.org>2007-09-23 01:07:23 +0000
commitec894ac2ea153a5d7a28ce71851ff27da0b46b50 (patch)
treea809f75c53d13275daf9e71a2d0d445ecc2abbc3 /lisp/ses.el
parent04efb39751e8d8f148facc9412f167df7d0d2799 (diff)
downloademacs-ec894ac2ea153a5d7a28ce71851ff27da0b46b50.tar.gz
emacs-ec894ac2ea153a5d7a28ce71851ff27da0b46b50.tar.bz2
emacs-ec894ac2ea153a5d7a28ce71851ff27da0b46b50.zip
(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