[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ses-mode runs unsafe functions even if you say "n" when prompted
From: |
Glenn Morris |
Subject: |
Re: ses-mode runs unsafe functions even if you say "n" when prompted |
Date: |
Sat, 22 Sep 2007 14:42:54 -0400 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Michael Schierl wrote:
> Formula (progn A1 (kill-emacs) 11)
> might be unsafe (function kill-emacs). Process it? (y or n)
>
> - Watch emacs to close anyway
Thanks. Can you try this patch please (apply to ses.el, then
byte-compile the file).
*** lisp/ses.el 25 Jul 2007 04:47:03 -0000 1.30.2.3
--- lisp/ses.el 22 Sep 2007 02:47:02 -0000
***************
*** 628,635 ****
(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))))
(condition-case sig
(setq newval (eval formula))
(error
--- 628,636 ----
(let ((oldval (ses-cell-value cell))
(formula (ses-cell-formula cell))
newval)
! (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