Backport: Don't compare arguments that can be nil (Bug#28039)
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 commit is contained in:
@@ -3051,7 +3051,7 @@ 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 (> beg end)
|
||||
(when (and beg end (> beg end))
|
||||
(let ((temp beg))
|
||||
(setq beg end
|
||||
end temp)))
|
||||
|
||||
Reference in New Issue
Block a user