Function: ses--advice-copy-region-as-kill
ses--advice-copy-region-as-kill is a byte-compiled function defined in
ses.el.gz.
Signature
(ses--advice-copy-region-as-kill CRAK-FUN BEG END &rest ARGS)
Documentation
It doesn't make sense to copy read-only or intangible attributes into the kill ring. It probably doesn't make sense to copy keymap properties. We'll assume copying front-sticky properties doesn't make sense, either.
This advice also includes some SES-specific code because otherwise it's too hard to override how mouse-1 works.
Source Code
;; Defined in /usr/src/emacs/lisp/ses.el.gz
;;----------------------------------------------------------------------------
;; Cut and paste, import and export
;;----------------------------------------------------------------------------
(defun ses--advice-copy-region-as-kill (crak-fun beg end &rest args)
;; FIXME: Why doesn't it make sense to copy read-only or
;; intangible attributes? They're removed upon yank!
"It doesn't make sense to copy read-only or intangible attributes into the
kill ring. It probably doesn't make sense to copy keymap properties.
We'll assume copying front-sticky properties doesn't make sense, either.
This advice also includes some SES-specific code because otherwise it's too
hard to override how mouse-1 works."
(when (and beg end (> beg end))
(let ((temp beg))
(setq beg end
end temp)))
(if (not (and (derived-mode-p 'ses-mode)
(eq (get-text-property beg 'read-only) 'ses)
(eq (get-text-property (1- end) 'read-only) 'ses)))
(apply crak-fun beg end args) ; Normal copy-region-as-kill.
(kill-new (ses-copy-region beg end))
(if transient-mark-mode
(setq deactivate-mark t))
nil))