[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/ses.el
From: |
Kim F . Storm |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/ses.el |
Date: |
Mon, 31 Jan 2005 17:47:40 -0500 |
Index: emacs/lisp/ses.el
diff -c emacs/lisp/ses.el:1.13 emacs/lisp/ses.el:1.14
*** emacs/lisp/ses.el:1.13 Sat Jan 29 17:31:32 2005
--- emacs/lisp/ses.el Mon Jan 31 22:47:40 2005
***************
*** 515,521 ****
(defun ses-create-cell-variable-range (minrow maxrow mincol maxcol)
"Create buffer-local variables for cells. This is undoable."
! (push `(ses-destroy-cell-variable-range ,minrow ,maxrow ,mincol ,maxcol)
buffer-undo-list)
(let (sym xrow xcol)
(dotimes (row (1+ (- maxrow minrow)))
--- 515,521 ----
(defun ses-create-cell-variable-range (minrow maxrow mincol maxcol)
"Create buffer-local variables for cells. This is undoable."
! (push `(apply ses-destroy-cell-variable-range ,minrow ,maxrow ,mincol
,maxcol)
buffer-undo-list)
(let (sym xrow xcol)
(dotimes (row (1+ (- maxrow minrow)))
***************
*** 536,551 ****
(dotimes (col (1+ (- maxcol mincol)))
(setq sym (ses-create-cell-symbol (+ row minrow) (+ col mincol)))
(if (boundp sym)
! (push `(ses-set-with-undo ,sym ,(symbol-value sym))
buffer-undo-list))
(kill-local-variable sym))))
! (push `(ses-create-cell-variable-range ,minrow ,maxrow ,mincol ,maxcol)
buffer-undo-list))
(defun ses-reset-header-string ()
"Flags the header string for update. Upon undo, the header string will be
updated again."
! (push '(ses-reset-header-string) buffer-undo-list)
(setq ses--header-hscroll -1))
;;Split this code off into a function to avoid coverage-testing difficulties
--- 536,551 ----
(dotimes (col (1+ (- maxcol mincol)))
(setq sym (ses-create-cell-symbol (+ row minrow) (+ col mincol)))
(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))
(defun ses-reset-header-string ()
"Flags the header string for update. Upon undo, the header string will be
updated again."
! (push '(apply ses-reset-header-string) buffer-undo-list)
(setq ses--header-hscroll -1))
;;Split this code off into a function to avoid coverage-testing difficulties
***************
*** 1325,1332 ****
(equal (symbol-value sym) newval)
(not (stringp newval)))
(push (if (boundp sym)
! `(ses-set-with-undo ,sym ,(symbol-value sym))
! `(ses-unset-with-undo ,sym))
buffer-undo-list)
(set sym newval)
t))
--- 1325,1332 ----
(equal (symbol-value sym) newval)
(not (stringp newval)))
(push (if (boundp sym)
! `(apply ses-set-with-undo ,sym ,(symbol-value sym))
! `(apply ses-unset-with-undo ,sym))
buffer-undo-list)
(set sym newval)
t))
***************
*** 1334,1346 ****
(defun ses-unset-with-undo (sym)
"Set SYM to be unbound. This is undoable."
(when (1value (boundp sym)) ;;Always bound, except after a programming error
! (push `(ses-set-with-undo ,sym ,(symbol-value sym)) buffer-undo-list)
(makunbound sym)))
(defun ses-aset-with-undo (array idx newval)
"Like aset, but undoable. Result is t if element has changed"
(unless (equal (aref array idx) newval)
! (push `(ses-aset-with-undo ,array ,idx ,(aref array idx))
buffer-undo-list)
(aset array idx newval)
t))
--- 1334,1346 ----
(defun ses-unset-with-undo (sym)
"Set SYM to be unbound. This is undoable."
(when (1value (boundp sym)) ;;Always bound, except after a programming error
! (push `(apply ses-set-with-undo ,sym ,(symbol-value sym))
buffer-undo-list)
(makunbound sym)))
(defun ses-aset-with-undo (array idx newval)
"Like aset, but undoable. Result is t if element has changed"
(unless (equal (aref array idx) newval)
! (push `(apply ses-aset-with-undo ,array ,idx ,(aref array idx))
buffer-undo-list)
(aset array idx newval)
t))
***************
*** 2066,2072 ****
(dotimes (col ses--numcols)
(aset newrow col (ses-make-cell)))
(setq ses--cells (ses-vector-insert ses--cells row newrow))
! (push `(ses-vector-delete ses--cells ,row 1) buffer-undo-list)
(insert ses--blank-line))
;;Insert empty lines in cell data area (will be replaced by
;;ses-relocate-all)
--- 2066,2072 ----
(dotimes (col ses--numcols)
(aset newrow col (ses-make-cell)))
(setq ses--cells (ses-vector-insert ses--cells row newrow))
! (push `(apply ses-vector-delete ses--cells ,row 1) buffer-undo-list)
(insert ses--blank-line))
;;Insert empty lines in cell data area (will be replaced by
;;ses-relocate-all)