Function: ses-destroy-cell-variable-range

ses-destroy-cell-variable-range is a byte-compiled function defined in ses.el.gz.

Signature

(ses-destroy-cell-variable-range MINROW MAXROW MINCOL MAXCOL)

Documentation

Destroy buffer-local variables for cells. This is undoable.

Source Code

;; Defined in /usr/src/emacs/lisp/ses.el.gz
;; We do not delete the ses-cell properties for the cell-variables, in
;; case a formula that refers to this cell is in the kill-ring and is
;; later pasted back in.
(defun ses-destroy-cell-variable-range (minrow maxrow mincol maxcol)
  "Destroy buffer-local variables for cells.  This is undoable."
  (let (sym)
    (dotimes (row (1+ (- maxrow minrow)))
      (dotimes (col (1+ (- maxcol mincol)))
	(let ((xrow  (+ row minrow)) (xcol (+ col mincol)))
	  (setq sym (if (and (< xrow ses--numrows) (< xcol ses--numcols))
			(ses-cell-symbol xrow xcol)
			(ses-create-cell-symbol xrow xcol))))
	(if (boundp sym)
	    (push `(apply ses-set-with-undo ,sym ,(symbol-value sym))
		  buffer-undo-list))
	(kill-local-variable sym))))
  (push `(apply ses-create-cell-variable-range ,minrow ,maxrow ,mincol ,maxcol)
	buffer-undo-list))