1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00

Make sure SES always writes non abbreviated expressions to data area.

Corrupted data area would occur when print-length or print-level are non nil.
This commit is contained in:
Vincent Belaïche 2024-07-27 18:33:00 +02:00
parent 7753a597fb
commit e8f38d1364

View File

@ -1443,9 +1443,10 @@ undoable. Return nil when there was no change, and non-nil otherwise."
(ses-widen)
(goto-char ses--params-marker)
(forward-line (plist-get ses-paramlines-plist 'ses--numlocprn ))
(let (print-level print-length)
(insert (format (plist-get ses-paramfmt-plist 'ses--numlocprn)
ses--numlocprn)
?\n)
?\n))
t) )))
(defun ses-set-parameter (def value &optional elem)
@ -1467,7 +1468,7 @@ If ELEM is specified, it is the array subscript within DEF to be set to VALUE."
(setq oldval (symbol-value def))
(set def value))
;; Special undo since it's outside the narrowed buffer.
(let (buffer-undo-list)
(let (buffer-undo-list print-level print-length)
(delete-region (point) (line-end-position))
(insert (format fmt (symbol-value def))))
(push `(apply ses-set-parameter ,def ,oldval ,elem) buffer-undo-list))))
@ -1478,6 +1479,7 @@ If ELEM is specified, it is the array subscript within DEF to be set to VALUE."
Newlines in the data are escaped."
(let* ((inhibit-read-only t)
(print-escape-newlines t)
print-level print-length
rowcol row col cell sym formula printer text)
(setq ses-start-time (float-time))
(with-temp-message " "
@ -2532,7 +2534,7 @@ Return nil if cell formula was unsafe and user declined confirmation."
(row (car rowcol))
(col (cdr rowcol))
(formula (ses-cell-formula row col))
initial)
initial print-level print-length)
(if (eq (car-safe formula) 'ses-safe-formula)
(setq formula (cadr formula)))
(if (eq (car-safe formula) 'quote)