summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2017-12-16 01:34:35 +0100
committerOscar Fuentes <ofv@wanadoo.es>2017-12-16 01:37:21 +0100
commit506270f9c80bf9bd7dad35a2f0aa6f477da6490b (patch)
treef1cbb2ff9941904bb03e32c26be0d13a7566b950 /lisp
parent5e6fb1e246b1e7f44ebba48e7e24f597a8eb92dd (diff)
downloademacs-506270f9c80bf9bd7dad35a2f0aa6f477da6490b.tar.gz
emacs-506270f9c80bf9bd7dad35a2f0aa6f477da6490b.tar.bz2
emacs-506270f9c80bf9bd7dad35a2f0aa6f477da6490b.zip
Don't compare arguments that can be nil
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.
Diffstat (limited to 'lisp')
-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.
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)))