Function: ses-vector-delete

ses-vector-delete is a byte-compiled function defined in ses.el.gz.

Signature

(ses-vector-delete ARRAY IDX COUNT)

Documentation

Create a new vector which is a copy of ARRAY with COUNT objects removed starting at element IDX. ARRAY is either a vector or a symbol whose value is a vector--if a symbol, the new vector is assigned as the symbol's value.

Source Code

;; Defined in /usr/src/emacs/lisp/ses.el.gz
;;Allow ARRAY to be a symbol for use in buffer-undo-list
(defun ses-vector-delete (array idx count)
  "Create a new vector which is a copy of ARRAY with COUNT objects removed
starting at element IDX.  ARRAY is either a vector or a symbol whose value
is a vector--if a symbol, the new vector is assigned as the symbol's value."
  (let* ((a      (if (arrayp array) array (symbol-value array)))
	 (len    (- (length a) count))
	 (result (make-vector len nil)))
    (dotimes (x len)
      (aset result x (aref a (if (< x idx) x (+ x count)))))
    (if (symbolp array)
	(set array result))
    result))