aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Fuentes2017-12-16 01:34:35 +0100
committerOscar Fuentes2017-12-17 05:48:13 +0100
commit2e9eba2013521cb55dc4613733a65d3c6408c65f (patch)
tree8cf7927bebd31bd9b7a27429cb57e737c5084150
parent89cfdbf729bc731331358e0efc69547547aa3ca2 (diff)
downloademacs-2e9eba2013521cb55dc4613733a65d3c6408c65f.tar.gz
emacs-2e9eba2013521cb55dc4613733a65d3c6408c65f.zip
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.
-rw-r--r--lisp/ses.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/ses.el b/lisp/ses.el
index 4c19c70c5da..188992c78fb 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -3051,7 +3051,7 @@ We'll assume copying front-sticky properties doesn't make sense, either.
3051 3051
3052This advice also includes some SES-specific code because otherwise it's too 3052This advice also includes some SES-specific code because otherwise it's too
3053hard to override how mouse-1 works." 3053hard to override how mouse-1 works."
3054 (when (> beg end) 3054 (when (and beg end (> beg end))
3055 (let ((temp beg)) 3055 (let ((temp beg))
3056 (setq beg end 3056 (setq beg end
3057 end temp))) 3057 end temp)))