mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +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:
parent
7753a597fb
commit
e8f38d1364
12
lisp/ses.el
12
lisp/ses.el
@ -1443,9 +1443,10 @@ undoable. Return nil when there was no change, and non-nil otherwise."
|
|||||||
(ses-widen)
|
(ses-widen)
|
||||||
(goto-char ses--params-marker)
|
(goto-char ses--params-marker)
|
||||||
(forward-line (plist-get ses-paramlines-plist 'ses--numlocprn ))
|
(forward-line (plist-get ses-paramlines-plist 'ses--numlocprn ))
|
||||||
(insert (format (plist-get ses-paramfmt-plist 'ses--numlocprn)
|
(let (print-level print-length)
|
||||||
ses--numlocprn)
|
(insert (format (plist-get ses-paramfmt-plist 'ses--numlocprn)
|
||||||
?\n)
|
ses--numlocprn)
|
||||||
|
?\n))
|
||||||
t) )))
|
t) )))
|
||||||
|
|
||||||
(defun ses-set-parameter (def value &optional elem)
|
(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))
|
(setq oldval (symbol-value def))
|
||||||
(set def value))
|
(set def value))
|
||||||
;; Special undo since it's outside the narrowed buffer.
|
;; 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))
|
(delete-region (point) (line-end-position))
|
||||||
(insert (format fmt (symbol-value def))))
|
(insert (format fmt (symbol-value def))))
|
||||||
(push `(apply ses-set-parameter ,def ,oldval ,elem) buffer-undo-list))))
|
(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."
|
Newlines in the data are escaped."
|
||||||
(let* ((inhibit-read-only t)
|
(let* ((inhibit-read-only t)
|
||||||
(print-escape-newlines t)
|
(print-escape-newlines t)
|
||||||
|
print-level print-length
|
||||||
rowcol row col cell sym formula printer text)
|
rowcol row col cell sym formula printer text)
|
||||||
(setq ses-start-time (float-time))
|
(setq ses-start-time (float-time))
|
||||||
(with-temp-message " "
|
(with-temp-message " "
|
||||||
@ -2532,7 +2534,7 @@ Return nil if cell formula was unsafe and user declined confirmation."
|
|||||||
(row (car rowcol))
|
(row (car rowcol))
|
||||||
(col (cdr rowcol))
|
(col (cdr rowcol))
|
||||||
(formula (ses-cell-formula row col))
|
(formula (ses-cell-formula row col))
|
||||||
initial)
|
initial print-level print-length)
|
||||||
(if (eq (car-safe formula) 'ses-safe-formula)
|
(if (eq (car-safe formula) 'ses-safe-formula)
|
||||||
(setq formula (cadr formula)))
|
(setq formula (cadr formula)))
|
||||||
(if (eq (car-safe formula) 'quote)
|
(if (eq (car-safe formula) 'quote)
|
||||||
|
Loading…
Reference in New Issue
Block a user