Function: ses-kill-override

ses-kill-override is an interactive and byte-compiled function defined in ses.el.gz.

Signature

(ses-kill-override BEG END)

Documentation

Generic override for any commands that kill text.

We clear the killed cells instead of deleting them.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/ses.el.gz
(defun ses-kill-override (beg end)
  "Generic override for any commands that kill text.
We clear the killed cells instead of deleting them."
  (interactive "r")
  (ses-check-curcell 'needrange)
  ;; For some reason, the text-read-only error is not caught by `delete-region',
  ;; so we have to use subterfuge.
  (let ((buffer-read-only t))
    (1value (condition-case nil
		(noreturn (funcall (lookup-key (current-global-map)
					       (this-command-keys))
				   beg end))
	      (buffer-read-only nil)))) ; The expected error.
  ;; Because the buffer was marked read-only, the kill command turned itself
  ;; into a copy.  Now we clear the cells or signal the error.  First we check
  ;; whether the buffer really is read-only.
  (barf-if-buffer-read-only)
  (ses-begin-change)
  (ses-dorange ses--curcell
    (ses-clear-cell row col))
  (ses-jump (car ses--curcell)))