copy-region-as-kill can be called passing nil as `beg' and
`end'. Magit does that, which caused an error when this advice was in
effect.
* lisp/ses.el (ses--advice-copy-region-as-kill): avoid comparison
unless `beg' and `end' are non-nil.
This advice also includes some SES-specific code because otherwise it's too
hard to override how mouse-1 works."
- (when (> beg end)
+ (when (and beg end (> beg end))
(let ((temp beg))
(setq beg end
end temp)))