changeset 84797:846e4a8ec0b7

(ses-calculate-cell): Don't evaluate unsafe formulae.
author Glenn Morris <rgm@gnu.org>
date Sun, 23 Sep 2007 01:08:25 +0000
parents a8b34a61039d
children 4ed0cd5e3dee
files lisp/ses.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ses.el	Sun Sep 23 01:07:00 2007 +0000
+++ b/lisp/ses.el	Sun Sep 23 01:08:25 2007 +0000
@@ -628,8 +628,9 @@
     (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