From 2aa018afebeee326e079a2f8e7fafc36d40be7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Bela=C3=AFche?= Date: Sun, 5 Jan 2025 16:15:03 +0100 Subject: [PATCH] Bind dynamically row col on calling ses-after-entry-functions. --- lisp/ses.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/ses.el b/lisp/ses.el index 1fa7d01e8fa..afed656affb 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -2596,8 +2596,9 @@ Return nil if cell formula was unsafe and user declined confirmation." curval))))))) (when (ses-edit-cell row col newval) (ses-command-hook) ; Update cell widths before movement. - (dolist (x ses-after-entry-functions) - (funcall x 1)))) + (cl-progv '(row col) (list row col) ; cl-progv to have dynamic binding + (dolist (x ses-after-entry-functions) + (funcall x 1))))) (defun ses-read-symbol (row col symb) "Self-insert for a symbol as a cell formula. @@ -2616,8 +2617,9 @@ spreadsheet is available for completions." (list 'quote (intern newval)))))) (when (ses-edit-cell row col symb) (ses-command-hook) ; Update cell widths before movement. - (dolist (x ses-after-entry-functions) - (funcall x 1)))) + (cl-progv '(row col) (list row col) ; cl-progv to have dynamic binding + (dolist (x ses-after-entry-functions) + (funcall x 1))))) (defun ses-clear-cell-forward (count) "Delete formula and printer for current cell and then move to next cell.