From da8b9ab0d89e7724e7d7ee9468d6f1e83ab6a053 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vincent=20Bela=C3=AFche?= Date: Mon, 21 Jul 2014 19:53:38 +0200 Subject: [PATCH] Correct ses-truncate-cell bug implied by setting ses.el in lexical binding: row and col had been erronously made unbound. --- lisp/ChangeLog | 6 ++++++ lisp/ses.el | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1c557c91602..8a916a7f110 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-07-21 Vincent Belaïche + + * ses.el (ses-truncate-cell): Use cl-progv instead of eval in + order to ensure that row and col are lexically bound inside the + evaluated sexp. + 2014-07-21 Glenn Morris * progmodes/hideif.el (hide-ifdef-mode-submap): diff --git a/lisp/ses.el b/lisp/ses.el index a4f5609575d..bfe021f5300 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -2252,8 +2252,10 @@ to are recalculated first." (eq (ses-cell-value row (1+ col)) '*skip*)) ;; This cell has spill-over. We'll momentarily pretend the following cell ;; has a `t' in it. - (eval `(let ((,(ses-cell-symbol row (1+ col)) t)) - (ses-print-cell row col))) + (cl-progv + (list (ses-cell-symbol row (1+ col))) + '(t) + (ses-print-cell row col)) ;; Now remove the *skip*. ses-print-cell is always nil here. (ses-set-cell row (1+ col) 'value nil) (1value (ses-print-cell row (1+ col)))))) -- 2.39.2